forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Graphics overwriting when colour mode is "RGB"

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
DASwainEsq



Joined: 24 Feb 2015
Posts: 4

PostPosted: Wed Feb 25, 2015 12:58 pm    Post subject: Graphics overwriting when colour mode is "RGB" Reply with quote

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
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Feb 25, 2015 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Feb 25, 2015 4:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
DASwainEsq



Joined: 24 Feb 2015
Posts: 4

PostPosted: Thu Feb 26, 2015 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Wed Mar 04, 2015 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Mar 04, 2015 7:33 am    Post subject: Reply with quote

XOR is "exclusive OR" that is "one or other but not both".
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group