Hi Alex, I think that Stef is looking for a composition example. Could you please provide an example that is more canonical and shows the composition of two elements instead of playing with both drawOnSpartaCanvas and the shape? Cheers, Doru
On Apr 2, 2016, at 8:17 PM, Aliaksei Syrel <alex.syrel@gmail.com> wrote:
How to make square element with filled circle inside:
1) Subclass BlElement -> BlCell 2) Override drawOnSpartaCanvas: aCanvas super drawOnSpartaCanvas: aCanvas. aCanvas setShape: self localBounds; setStrokePaint: Color blue; stroke
3) Override initialize to have circle shape: initialize super initialize. self shapeDo: [ :aShape | aShape path: BlCirclePath new; fillPaint: Color red ]. 4) Open cell in word
Easy :)
-- www.tudorgirba.com www.feenk.com "We can create beautiful models in a vacuum. But, to get them effective we have to deal with the inconvenience of reality."