2014-06-25 0:21 GMT+02:00 Igor Stasenko <siguctua@gmail.com>:



On 21 June 2014 09:23, Hilaire Fernandes <hilaire.fernandes@gmail.com> wrote:
Hello,


I tried this but it produces empty form.

|canvas |
canvas := (Form extent: aDrgeo area athensSurface extent depth: 32)
getCanvas.
aDrgeo area athensSurface displayOnMorphicCanvas: canvas at: 0@0.
canvas form

should not..
try to #flush operations on surface before blitting it to form.

��

Hilaire

Le 20/06/2014 12:55, Igor Stasenko a ��crit :
> the best way is to blit surface on the morphic canvas
> using
> displayOnMorphicCanvas: canvas at: aPoint
> method.
>




--
Best regards,
Igor Stasenko.



This works for me:

������ | sur form |
������ sur := AthensCairoSurface extent: 300 @ 300.
������ sur
������ ������ drawDuring: [ :can |
������ ������ ������ can pathTransform
������ ������ ������ ������ restoreAfter: [
������ ������ ������ ������ ������ can surface clear: Color black.
������ ������ ������ ������ ������ can pathTransform translateX: 150 Y: 150.
������ ������ ������ ������ ������ can setPaint: (Color green alpha: 0.1).
������ ������ ������ ������ ������ can setShape: (-150 @ -150 corner: 150 @ 150).
������ ������ ������ ������ ������ 20
������ ������ ������ ������ ������ ������ timesRepeat: [
������ ������ ������ ������ ������ ������ ������ can draw.
������ ������ ������ ������ ������ ������ ������ can pathTransform scaleBy: 0.85.
������ ������ ������ ������ ������ ������ ������ can pathTransform rotateByDegrees: 10.
������ ������ ������ ������ ������ ������ ������ ��] ] ].
������ ������ ������ ������
������ form := Form extent: sur extent depth: 32.
������
������ sur displayOnMorphicCanvas: form getCanvas at: 0 @ 0.
������ (ImageMorph withForm: form) openInHand