> Dnia Thu, 08 May 2008 22:50:06 -0700, matthiasm napisał(a):
>
> > Did you look at Fl_Overlay_Window though? Maybe you can draw the
> > crosshair in the overlay and then never be bothered with it again?
>
> I looked at it in the documentation, but the latter stated, AFAIR, that
> it will look jerky if hardware doesn't provide some functionality. I
> think that crosshair is simple enough to look good on any hardware (just
> like, say, mouse cursor), and so I'm doing my own.
>
> (basically, three offscreens: main (dimensions w x h), line_x (w x 1) ,
> line_y (1 x h); the draw() function gets the position (a,b) of the cursor
> and it remembers old position (a_old, b_old) of the cursor, and it copies
> suitable lines between offscreens and actual screen)
>
> Lukasz

Am I missing something here or are you trying to draw a simple crosshair in a 
window?

If so, then you can use a system mouse cursor by changing the cursor to 
FL_CROSS_HAIR when you see the FL_ENTER event and reverting to a standard 
cursor when it leaves the window. The Cursor is then updated by the OS for free.
As the crosshair cursor is rarely used in other applications, if you want 
something a little different from the system cursor just replace it with your 
own.
This certainly works under MS Windows and I can't see why it shouldn't work 
under other OS's too.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to