A83: Re: screen section inverting


[Prev][Next][Index][Thread]

A83: Re: screen section inverting




This reply is to the post someone made about inverting the pixels in sections 
for highlighting. Sorry I Lost the original post, and subject, so I just made 
this one. Also the reply about inverting the text was not what you wanted, I 
assume... 

To invert pixels in a rectangular section in plotsscreen, you'd prolly want 
to do the rectangles according to screen coordinates, so first you'd start 
with a Findpixel routine that XORs a Bit. Then you'd make that into a line 
routine using a loop, and then to make a filled rectangle, you'd use that 
line routine in a loop as well to move it across... All of this I have done 
in a set of routines I released on the TCPA page. No one I know really had 
any use for them, but I used them all the time. Hopefully they will be of 
help to you as well...

Those routines are good if you have coordinate areas that varry, but someone 
else may tell you to make a more optimized inverting routine that is specific 
to your program, in which the area you need inverted would be aligned on 
bytes, then you would take each byte, XOR the bits in it, and store it back 
to plotsscreen. Such a situation is used in shells like SOS and ION where 7 
rows of pixels on the current description that is highlighted, have their 
bytes XORed all in that section. However it is not always the case to need an 
aligned section like that XORed, so my routines would be best for doing 
coordinate areas. cya...

Jason_K