Re: [Pharo-project] Extent a Athens surface?
Hola Vanessa, i can help you if, but i don't fully understand what do you want to achieve by "extending" the surface. Saludos, Fernando On Mon, Jan 28, 2013 at 10:17 PM, Vanessa Peña Araya <van.c.pena@gmail.com>wrote:
Hi,
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe?
Thanks, Vanessa.
On Jan 28, 2013, at 6:25 PM, Fernando Olivero wrote:
Hola Vanessa,
i can help you if, but i don't fully understand what do you want to achieve by "extending" the surface.
I think that creating a larger surface. Stef
Saludos, Fernando
On Mon, Jan 28, 2013 at 10:17 PM, Vanessa Peña Araya <van.c.pena@gmail.com> wrote: Hi,
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe?
Thanks, Vanessa.
On 28 January 2013 23:11, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Jan 28, 2013, at 6:25 PM, Fernando Olivero wrote:
Hola Vanessa,
i can help you if, but i don't fully understand what do you want to achieve by "extending" the surface.
I think that creating a larger surface.
how large? is AthensCairoSurface extent: 2000@2000 not works?
Stef
Saludos, Fernando
On Mon, Jan 28, 2013 at 10:17 PM, Vanessa Peña Araya <van.c.pena@gmail.com> wrote: Hi,
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe?
Thanks, Vanessa.
-- Best regards, Igor Stasenko.
Igor Stasenko wrote
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe? how large? is
AthensCairoSurface extent: 2000@2000
not works?
I think it is about resizing an existing Morph that is drawn with Athens Surface? I had problems with it and had the same question. But it works well with something like: SomeSubclassOfMorph>>extent: aPoint |newExtent| newExtent := aPoint rounded. (bounds extent closeTo: newExtent) ifTrue: [^ self]. self changed. bounds := (bounds topLeft extent: newExtent). surface := AthensCairoSurface extent: newExtent. self layoutChanged. self changed. Now Boids fly in a resizable sky :) -- View this message in context: http://forum.world.st/Extent-a-Athens-surface-tp4665978p4666666.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 30 January 2013 18:14, MartinW <wm@fastmail.fm> wrote:
Igor Stasenko wrote
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe? how large? is
AthensCairoSurface extent: 2000@2000
not works?
I think it is about resizing an existing Morph that is drawn with Athens Surface? I had problems with it and had the same question. But it works well with something like:
SomeSubclassOfMorph>>extent: aPoint |newExtent| newExtent := aPoint rounded. (bounds extent closeTo: newExtent) ifTrue: [^ self]. self changed. bounds := (bounds topLeft extent: newExtent). surface := AthensCairoSurface extent: newExtent. self layoutChanged. self changed.
Now Boids fly in a resizable sky :)
yes. this is the way. you cannot resize existing surface, but create a new one instead.
-- View this message in context: http://forum.world.st/Extent-a-Athens-surface-tp4665978p4666666.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
Hi, Thank you very much for your answer, it works perfectly :) Vanessa. On 01/30/2013 05:44 PM, Igor Stasenko wrote:
On 30 January 2013 18:14, MartinW <wm@fastmail.fm> wrote:
Igor Stasenko wrote
I wanted to ask if it's possible to extent an Athens surface. If it can't be done, because as far as I understand this can't be done in Cairo, is it possible to simulate it at least? Is it possible to stop #drawDuring: and build another surface, maybe? how large? is
AthensCairoSurface extent: 2000@2000
not works? I think it is about resizing an existing Morph that is drawn with Athens Surface? I had problems with it and had the same question. But it works well with something like:
SomeSubclassOfMorph>>extent: aPoint |newExtent| newExtent := aPoint rounded. (bounds extent closeTo: newExtent) ifTrue: [^ self]. self changed. bounds := (bounds topLeft extent: newExtent). surface := AthensCairoSurface extent: newExtent. self layoutChanged. self changed.
Now Boids fly in a resizable sky :)
yes. this is the way. you cannot resize existing surface, but create a new one instead.
-- View this message in context: http://forum.world.st/Extent-a-Athens-surface-tp4665978p4666666.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (5)
-
Fernando Olivero -
Igor Stasenko -
MartinW -
Stéphane Ducasse -
Vanessa Peña Araya