nanogui: How to create rounded rectangle and dotted lines ?


Previous by date: 18 May 2001 21:58:06 -0000 Widgets in nano-x, Sridharan Subramanian
Next by date: 18 May 2001 21:58:06 -0000 Re: subject line, Alex Holden
Previous in thread: 18 May 2001 21:58:06 -0000 Re: How to create rounded rectangle and dotted lines ?, Jordan Crouse
Next in thread:

Subject: Re: How to create rounded rectangle and dotted lines ?
From: "Greg Haerr" ####@####.####
Date: 18 May 2001 21:58:06 -0000
Message-Id: <02cb01c0dfd4$b1d91a70$6817dbd0@censoft.com>

: I would really like to see your wide lines alogrithm as I have been unable
to
: find a good wide line alogrithm in any of my graphics texts.

Certainly a good place to start is with Keith Packard's excellent
work with the X server.  Look at xc/programs/Xserver/mi/miwidelines.c
I think.  Yes, this is overkill completely, but, if you want to do it
right, these are all the things you get to think of.  The wide lines
algorithm basically uses floating point to "draw" the left and right
sides of the wideline, and scan-line fills each segment.  I could
probably add this type of code to Microwindows very quickly,
for single line segments.  But no one draws single-line wide lines,
they're typically connected together, and that's where things get
hairy.  Join-styles, arc, caps etc have to be computed, and, to
make it worse, then the scan line array needs to be sorted so that
in the case of XOR drawing each bit is hit only once...

The major purpose for this madness would be in the scribble
handwriting recognition for Microwindows.  I'd love to see the
strokes in wide lines.

Regards,

Greg


Previous by date: 18 May 2001 21:58:06 -0000 Widgets in nano-x, Sridharan Subramanian
Next by date: 18 May 2001 21:58:06 -0000 Re: subject line, Alex Holden
Previous in thread: 18 May 2001 21:58:06 -0000 Re: How to create rounded rectangle and dotted lines ?, Jordan Crouse
Next in thread:


Powered by ezmlm-browse 0.20.