[cairo] Cairo lines disappear in a certain scale range

robert9reen at yahoo.com robert9reen at yahoo.com
Fri Apr 3 00:18:31 PDT 2009

Thank you Joonas

--- On Thu, 4/2/09, M Joonas Pihlaja wrote:


> preprocessing.  If you're looking at a m^2 in London,
> there's no point 
> in feeding the renderer any geometry elsewhere in the
> world!  
> Similarly, if you're looking at the entire world, some
> geometry 
> simplification is definitely in order. :)


You're right, but still.. when you're looking at a m2 in London and you have an astronomically long beam of light or a virtual map line or whatever (whose endpoints coordinates are +/- trillions of units away) which happens to cross the bounding rectangle of the m2 you're looking at.. AND if mapping the user coordinates of that large entity to device space generates an overflow.. then things get more complicated. What do think? Maybe if it's just a line, one can easily calculate the intersection points between the line and the device space extents rectangle (and trim), but if the astronomical entity (which happens to pass through our m2 in London) is a nurbs or other complex thing.. we'll have a lot of work to do.. so the main issue remains when you have an ultra high scale entity and a low scale one which happen to intersect with your display frame -- we may never omit showing a large scale entity if it effectively passes through the viewport, regardless
 of scale.

You are absolutely right to consider a graphics library as a limited drawing system and deal with it accordingly -- because graphics libraries are *still* surprisingly incomplete - rather than limited: because when a library offers interspace conversions it should also handle overflows or at least return warnings. Besides, the crazy hassle (clipping, trimming, etc.) all graphics programmers have to go through again and again for each new library and/or target subsystem creates a need, almost an urge, in my humble opinion, for a community effort in order to elaborate a consistent model which would become the base of a new generation of libraries. I strongly believe and hope that the issues we've been discussing so far will some day be handled and resolved by extending the existing standard libraries -- so you and I and others won't have to reinvent the same old wheel individually.

Cheers to you,



More information about the cairo mailing list