: It should be easy to convert CreateRoundRectRgn to
: a GrRoundRect function, but I'm not familiar with
: Win32 API, and it seems that RECT in CreateRoundRectRgn
: is not the same with GR_RECT. Could someone tell me
: which structures and functions should be replaced?

This code may be a bit tricky, ultimately you will be
rewriting it completely to use GrLine and GrDrawPoint
calls to draw a rounded rectangle.  The example you
have uses region-unions, and none of that will work
for drawing your rounded rectangle.

To draw a rounded rectangle, each corner is drawn as
one quarter of a circle, connected to the top, bottom
and side lines.  Perhaps you should just use the GrArc
and GrLine routines after drawing a rounded rectangle
on graph paper.  For the arc radius, you can use the
code in CreateRoundRectRgn that sets the left
and right rectangle values.

As another thought, I think FLTK supports rounded 
rectangles, you might look at that code and convert
it to nano-X API.

Regards,

Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: nanogui-unsubscr...@linuxhacker.org
For additional commands, e-mail: nanogui-h...@linuxhacker.org

Reply via email to