Board index » delphi » Graphics Mode and the mouse.

Graphics Mode and the mouse.

I have another little question of why does it do that?  I am using the mouse in
 graphics mode 13h (320x200x256).  The mouse cursor is 16x16 pixels and you can
 define the mouse "hot spot" to be from -16 to 16 (x and y) with the upper left
 corner of the mouse cursor being (0,0).  I have noticed that when my hot spot
 is someplace on the cursor, pixel that I write that are currently under the
 cursor don't appear.  I believe that it has to do with the fact that I am
 writing directly to screen memory and with the way the mouse cursor masks are
 ANDed and XORed with the screen.  However, I don't really know why it acts
 this way and I don't know how to work around it.  Does anyone have any ideas?
 Does anyone understand what I am trying to say?

-Kanryl

Sorry, this post isn't exactly about Pascal, but I'm not sure where else to put
 it and I am programming in Pascal.

 

Re:Graphics Mode and the mouse.


In article <19971119024400.VAA13...@ladder02.news.aol.com>, Kanryl
<kan...@aol.com> writes

Quote
>I have another little question of why does it do that?  I am using the mouse in
> graphics mode 13h (320x200x256).  The mouse cursor is 16x16 pixels and you can
> define the mouse "hot spot" to be from -16 to 16 (x and y) with the upper left
> corner of the mouse cursor being (0,0).  I have noticed that when my hot spot
> is someplace on the cursor, pixel that I write that are currently under the
> cursor don't appear.  I believe that it has to do with the fact that I am
> writing directly to screen memory and with the way the mouse cursor masks are
> ANDed and XORed with the screen.  However, I don't really know why it acts
> this way and I don't know how to work around it.  Does anyone have any ideas?
> Does anyone understand what I am trying to say?

When you have the mouse cursor visible, the underlying character (in
text mode) or pixels (in graphics mode) are restored when the mouse
moves away.

You would really need to hide the mouse cursor before every write to the
screen and then show the mouse cursor afterwards.

If you are doing a nuber of writes in fairly quick succession then just
hide the cursor at the start and restore after the final pixel.
--
Pedt Scragg <postmas...@pedt.demon.co.uk>

In principle,   is there uncertainty that
Heisenberg was working his best in chaos?

Other Threads