View previous topic :: View next topic |
Author |
Message |
DASwainEsq
Joined: 24 Feb 2015 Posts: 4
|
Posted: Wed Feb 25, 2015 12:58 pm Post subject: Graphics overwriting when colour mode is "RGB" |
|
|
I have inherited code in "VGA" colour mode which I wish to update to us FTN95 7.1, "RGB" colour mode.
It allows transient "overwriting" of the graphics window by setting the VGA pen to (colour + 128) - used for drawing a "rubber-band" box to show an area of a map to be selected while moving the cursor.
Is there an equivalent trick in "RGB", or has anyone a method for doing the equivalent. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Wed Feb 25, 2015 1:08 pm Post subject: |
|
|
If I understand your question, call set_graphics_selection@ (1) should do what you are requiring. This requires you to hold down the left mouse button while selecting the region.
John |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Feb 25, 2015 4:16 pm Post subject: |
|
|
What you are doing is a manual version of John's suggestion.
Two other alternatives are to set VGA mode, or perhaps better as you want to go for te full benefits of RGB, then use the:
SUBROUTINE GRAPHICS_WRITE_MODE@(MODE)
with MODE=3, which is XOR. THat means you write the square shape once and it appears, but the next time you write it, it disappears.
Eddie |
|
Back to top |
|
|
DASwainEsq
Joined: 24 Feb 2015 Posts: 4
|
Posted: Thu Feb 26, 2015 11:38 am Post subject: |
|
|
Thanks Eddie/John.
I'll try the GRAPHICS_WRITE_MODE as I don't want to change how the user interacts with screen.
David |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Mar 04, 2015 7:23 am Post subject: |
|
|
Eddie, do you mean 'the next time you write it the first square disappears and the new one appears ' ?
What is XOR anyway, I have difficulty finding a clear definition in the manual ? Ta John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Wed Mar 04, 2015 7:33 am Post subject: |
|
|
XOR is "exclusive OR" that is "one or other but not both". |
|
Back to top |
|
|
|