Release 8.0 DP 10

-hh hh at livecode.org
Tue Nov 24 19:47:49 EST 2015


> Alejandro wrote:
> Remember, again, Livecode vector graphics only use integers (1,2,3,4,5...) for displaying graphics strokes (borders). This limitation IS an insurmountable barrier to import and display faithfully many professional illustrations created or exported to SVG format.

I read this often here, also from 'big LC-cheeses' (what is a compliment here). This is, TMHO, a misunderstanding or, at least, may create misunderstandings.

SVG is NOT able to divide the pixels of your screen or the points of your printing device, so the integer method of rendering integer coordinates of LC is effectively not at all different from vector graphics systems.

The difference is how the points are stored. "The points" of LC graphics could also be a list of floating point coordinates what prohibits better the fortifying of rounding errors (for example when rotating repeatedly by a few degrees.

M. Wieder has already done such a storing method, I believe, for some regular shapes that store internally the computed floating points and not the rounded-to-integer points. You can ask for the points also for some regular shapes (and get the rounded values).

Also one can set, beginning from LC 7, the points of an LC graphic objects to a list of floating points, you don't have to round these points before that, the engine does that for you.

For example this works in LC 7:

set points of grc "Line" to "1.0135, 1.0789, 40.5673, 156.8907"

That is you can take the numbers from svg paths 'directly', without rounding, as input for LC graphics.

From such a setting LC rounds to your pixels and a corresponding SVG yields exactly the same output (seen apart from antialiasing and other effects).

The limit is the resolution (the pixels), no matter who sets the pixel colours.

Hermann



More information about the use-livecode mailing list