[squeak-dev] Re: Bezier filled shape rendering artifacts
siguctua at gmail.com
Mon Mar 24 23:29:51 UTC 2008
On 24/03/2008, Klaus D. Witzel <klaus.witzel at cobss.com> wrote:
> On Mon, 24 Mar 2008 15:13:57 +0100, Igor Stasenko wrote:
> > I found it, (typed SWG in search :)
> > Your script not works.
> > There is no #fromFileStream: at class side.
> !SVGMorph class methodsFor: 'as yet unclassified' stamp: 'gvc 10/17/2005
> fromFileStream: aStream
> "Open an SVGMorph from the given stream."
> |sx doc|
> sx := aStream.
> (aStream name endsWith: 'svgz')
> ifTrue: [aStream binary.
> sx := (GZipReadStream on: aStream contentsOfEntireFile) upToEnd
> asString readStream].
> doc :=(XMLDOMParser parseDocumentFrom: sx).
> ^self new createFromSVGDocument: doc! !
> > I used following:
> > |doc|
> > doc:= XMLDOMParser parseDocumentFrom:
> > 'http://squeak.cobss.ch/JSesh/resources/glyphs/varia/Y4.svg'
> > asUrl retrieveContents contentStream.
> > (SVGMorph new createFromSVGDocument: doc) openInWorld
> Sure, that does it as well (it's the same).
Strange, i loaded latest version from SqMap, and there was no such method.
> > in result i got a tiny morph with little image in top-left corner of
> > screen.
> Just alt-click it and resize it (the little halo button in the
> bottom-right ;-)
> > Once i trying to move it, image disappears, and if move back -
> > it appears again. Looks like it's doesn't handle well coordinates.
> This one seems to be quite a different problem which I have as yet not
> investigated (but I know it also happens when putting these morphs into a
> window). The question with this one would be, "if it renders when resized,
> why doesn't it so when moved".
> But the currently interesting question is, given the example path/bezier
> segments, is there a bug with the engine or why doesn't it render what the
> platform browser does render. There are many examples of SVG+xml files for
> which there isn't this sort of problems; example
> - http://squeak.cobss.ch/seaside/sextant (a living Squeak desktop rendered
> by a running Seaside server on the fly).
> But I'm currently more interested to get rid of the problems with the
> path/bezier segments of
> - http://squeak.cobss.ch/JSesh/resources/glyphs/varia/Y4.svg
Well, i tested another files located in same directory, and they seem
I don't know why this particular glyph not rendered correctly, i can
only suppose that it
was defined with sequence of data, which wrongly parsed by SVGMorph.
Why i think it's not engine? Because engine can't twist point
coordinates of shape, it can only fail to fill shape correctly. And in
this glyph i see twisting coordinates, look like somewhere SVG morph
starts feeding engine with wrong coordinates.
Igor Stasenko AKA sig.
More information about the Squeak-dev