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. |
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 <[hidden email]> wrote: Hi, |
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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. |
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 :) |
On 30 January 2013 18:14, MartinW <[hidden email]> 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 :) > 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 <[hidden email]> 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. >> > > |
Free forum by Nabble | Edit this page |