|
Begin forwarded message: Subject: Some question and request for Athens
Date: March 25, 2013 11:45:31 AM GMT+01:00
Hi Igor!
I have some questions and request for Athens :)
1 Do exist a possibility in Athens to draw a Surface on a Surface? For example : aSurf drawSurface: anOtherSurface at: aPosition (I need it for draw image on a surface)
2 About my first question, I try to draw a png image on a Surface and I get some strange behavior. When nothing is applied on my first surface and draw the image in a rectangle path I crash the VM! This an example I tried and crash my VM:
|surf pharoLogo ref path patternPaint| surf := AthensCairoSurface extent: 600@600.
ref := 'pharo.png' asFileReference. pharoLogo := AthensCairoSurface createFromFile: ref fullName ifFailed:[nil].
surf drawDuring: [:can| surf clear. patternPaint := can setPaint: pharoLogo. patternPaint setExtend: #None. can drawShape: (0@0 extent: pharoLogo extent). ]. Display getCanvas drawImage: surf asForm at: 0@0.
If you need more information about the crash and my environment ask it :)
3. Do exist something in Athens to create some text and get the extent of the text? I tried to draw text but I only succeed to draw a text without font (only width) and I don't found how to get the extent of this text :( This is really important for the next of the porting because I'm blocking on that and the textModel is not necessary for the next of my work because they already have a layoutManager for the text.
Thanks Igor :)
Tristan
PS: The porting advance as well :) I have animation and that's really amazing :)
|