|
|
Subscribe / Log in / New account

LPC: 25 years of X

LPC: 25 years of X

Posted Sep 29, 2009 9:13 UTC (Tue) by PO8 (guest, #41661)
In reply to: LPC: 25 years of X by oak
Parent article: LPC: 25 years of X

Something was lost in translation, I think. Wide ellipses in X aren't specified as being drawn with a circular pen. Instead, they are specified as being drawn by moving a linear pen along the ellipse while holding it perpendicular to the ellipse. This turns out to be a really bad specification; the ellipses have these funny "hooks" and it really does require a nasty high-order polynomial to describe the inner and outer hull of the wide ellipse to the exact pixelization X requires. Worse are dashed ellipses, which turn out to be intractable altogether.


to post comments

LPC: 25 years of X

Posted Sep 30, 2009 14:57 UTC (Wed) by dgm (subscriber, #49227) [Link]

For a closed ellipses both descriptions should be geometrically equivalent, shouldn't they? What I'm missing?

LPC: 25 years of X

Posted Sep 30, 2009 19:41 UTC (Wed) by oak (guest, #2786) [Link]

> Worse are dashed ellipses, which turn out to be intractable altogether.

These WWS doesn't implement. The lines can be patterned, but if I
remember correctly my code, the pattern is based on the window
co-ordinates (this way the patterns for overlapped elements would match).

Btw. If you test the code, the arc drawing can be a bit buggy, it doesn't
handle all the corner cases (I didn't anymore have that much time for WWS,
and there wasn't really any users for that feature :-)). I've understood
that this was fixed in the Microwindows/Nano-X adaption of the code. They
needed it for their Xlib emulation, so they have tested it properly.

Arc endpoint calculations are done in the client library so that server
doesn't need to do any floating point calculations (a bit similar strategy
to Xft in pushing work to clients that cause the work).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds