[squeak-dev] Re: Bezier filled shape rendering artifacts
Gary Chambers
gazzaguru2 at btinternet.com
Tue Mar 25 14:57:40 UTC 2008
That too :-)
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of Igor
> Stasenko
> Sent: 25 March 2008 2:30 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] Re: Bezier filled shape rendering artifacts
>
>
> On 25/03/2008, Gary Chambers <gazzaguru2 at btinternet.com> wrote:
> > 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].
> >
> Hmm..
> is this correct notation: " 'CcSs' includes: c not "
> maybe more correct should be ('CcSs' includes: c) not ?
> and same for ('QqTt' includes: c) not
>
> >
> > 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"!
>
> Okay, one more test.
> open given morph
>
> (SVGMorph fromFileStream:
> 'http://squeak.cobss.ch/JSesh/resources/glyphs/varia/Y4.svg'
> asUrl retrieveContents contentStream
> ) openInWorld
>
> then inspect SVGPathMorph submorph and evaluate following:
>
> 2 to: segments size do: [:i | self assert:(segments at:i) start =
> (segments at:i-1) end ]
>
> Does endpoints of adjusted segments should be equal?
> Because this test shows that some are not.
>
> | good bad |
> good := bad := 0.
> 2 to: segments size do: [:i | (segments at:i) start = (segments
> at:i-1) end ifTrue: [ good := good +1] ifFalse: [ bad := bad +1 ] ].
> { good. bad }
>
> prints: #(86 8)
>
>
> >
> > Regards, Gary.
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
More information about the Squeak-dev
mailing list
|