[squeak-dev] Re: Bezier filled shape rendering artifacts

Gary Chambers gazzaguru2 at btinternet.com
Tue Mar 25 13:36:49 UTC 2008


Though I did find a bug (rarely encountered) in
SVGPathMorph>>createSegmentsFromSVG.

Replace

	data do: [:cmd |
		((cmd = $S or: [cmd = $s]) and: ['CcSs' includes: c not])
			ifTrue: [lastCubicControl := position].
		((cmd = $T or: [cmd = $t]) and: ['QqTt' includes: c not])
			ifTrue: [lastQuadraticControl := position].

with

	data do: [:cmd |
		((cmd key = $S or: [cmd key = $s]) and: ['CcSs' includes: c not])
			ifTrue: [lastCubicControl := position].
		((cmd key = $T or: [cmd key = $t]) and: ['QqTt' includes: c not])
			ifTrue: [lastQuadraticControl := position].


Also, never did get to the bottom of why the page bounds sometimes come out
wrong... (perhaps because taken from the SVG rather than computed
"after-the-fact").

Glad someone is still using the old SVGMorph "experiment"!

Regards, Gary.

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of Klaus
> D. Witzel
> Sent: 25 March 2008 12:31 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [squeak-dev] Re: Bezier filled shape rendering artifacts
>
>
> On Tue, 25 Mar 2008 12:45:48 +0100, Gary Chambers wrote:
>
> > I have noticed that the rendering is significantly improved for your
> > example
> > when scaled by a factor of 20, leading me to believe that Balloon has a
> > precision problem with small values and/or the fact that the
> minimum line
> > width is 1, regardless of any transform that may be in effect.
>
> No wonder I was mainly hunting gosts in your fine code, thank you
> Gary :)
> I'll give it a try as soon as I'm back from this afternoon's meetings.
>
>




More information about the Squeak-dev mailing list