On 4 April 2016 at 19:00, stepharo <[email protected]> wrote: > I saw in bleedingEdge it is different and looks better. > Now I was wondering why shape did not do the rendering and I thought that > this is may be because a shape can be used for doing something else > than rendering. For example clipping or as igor mentioned defining the > shape of the interaction > > > > drawOnSpartaCanvas: aCanvas > "Actually render receiver on aCanvas in local bounds. > Override to customize. > aCanvas is an instance of AthensCanvas > aCanvas must not be nil" > > self assert: self shape path context isNotNil. > > aCanvas > clipPreserveBy: self shape during: [ > aCanvas paintGroup: [ > aCanvas setPaint: self shape fillPaint. > aCanvas fillPreserve. > aCanvas paintMode source. > aCanvas setStrokePaint: self shape strokePaint. > aCanvas stroke ] ] >
where i can download and look at this code? > > unprotectedFullDrawOnSpartaCanvas: aCanvas > "Draw the full structure on the given Canvas withing drawing bounds > without caring about any errors and visibility. I am responsible for > clipping and transforming canvas's path to local coordinates > to allow simpler actual drawing in drawOnAthensCanvas: > Additional checks should be implemented in fullDrawOnAthensCanvas: > aCanvas is an instance of AthensCanvas. > aCanvas must not be nil. > @see BlElement>>#fullDrawOnAthensCanvas: > @see BlElement>>#drawOnAthensCanvas:" > self shape adaptTo: self. > self shape path context: aCanvas. > > aCanvas > transform: self transformation > during: [ > self clippingStrategy > clip: self > on: aCanvas > during: [ self drawOnSpartaCanvas: aCanvas ] > childrenDuring: [ self drawChildrenOnSpartaCanvas: aCanvas > ] ] > > -- Best regards, Igor Stasenko.
