Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-27 Thread stepharo
Just to not think much :) Take a little svg and try to rotate it and show all the steps you took and mistakes you made, until you got it right. Le 27/2/15 01:30, Sean P. DeNigris a écrit : stepharo wrote Could you write a little doc on what you learned? I have to think about it. There wer

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-26 Thread Sean P. DeNigris
stepharo wrote > Could you write a little doc on what you learned? I have to think about it. There were a lot of little ahas, but I don't know how to summarize it... The biggest realization was that "canvases + transforms" is extremely powerful! - Cheers, Sean -- View this message in contex

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-21 Thread stepharo
Sean Could you write a little doc on what you learned? I would love to read it. Stef Le 21/2/15 04:50, Sean P. DeNigris a écrit : Sean P. DeNigris wrote That worked But actually, it was totally unnecessary! MorphicTransform's scaling method arguments were either named (unhelpfully) 's' or (mis

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-21 Thread stepharo
Le 21/2/15 05:23, Sean P. DeNigris a écrit : Sean P. DeNigris wrote MorphicTransform's scaling method arguments were either named (unhelpfully) 's' or (misleadingly) 'aFloat' Issue 14971 MorphicTransform: Better Argument Names Fix in inbox... Scale: "s" -> aNumberOrPoint Angle: "a" -> radians

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-21 Thread Nicolai Hess
2015-02-21 4:50 GMT+01:00 Sean P. DeNigris : > Sean P. DeNigris wrote > > That worked > > But actually, it was totally unnecessary! MorphicTransform's scaling method > arguments were either named (unhelpfully) 's' or (misleadingly) 'aFloat', > but apparently, I can just pass aPoint to scale x and

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Sean P. DeNigris
Sean P. DeNigris wrote > MorphicTransform's scaling method arguments were either named > (unhelpfully) 's' or (misleadingly) 'aFloat' Issue 14971 MorphicTransform: Better Argument Names Fix in inbox... Scale: "s" -> aNumberOrPoint Angle: "a" -> radians Offset: a -> aPoint - Cheers, Sean --

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Sean P. DeNigris
Sean P. DeNigris wrote > That worked But actually, it was totally unnecessary! MorphicTransform's scaling method arguments were either named (unhelpfully) 's' or (misleadingly) 'aFloat', but apparently, I can just pass aPoint to scale x and y separately :) So I'm back to the simple version... dra

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Sean P. DeNigris
Nicolai Hess wrote > You can create a new Form... warpblt into this form... Ah, thanks. That worked. It became: drawOn: aCanvas | tempForm | tempForm := Form extent: self innerBounds extent depth: self image depth. (WarpBlt current toForm: tempForm) so

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Nicolai Hess
And there is FormCanvas>>#warpImage:transform:at:sourceRect:cellSize: this one works with a MatrixTransform2x3 (this may support scaling for x and y). 2015-02-21 0:40 GMT+01:00 Nicolai Hess : > 2015-02-20 23:56 GMT+01:00 Sean P. DeNigris : > >> I'm implementing a SimpleImageMorph which squeezes

Re: [Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Nicolai Hess
2015-02-20 23:56 GMT+01:00 Sean P. DeNigris : > I'm implementing a SimpleImageMorph which squeezes the form into the > Morph's > inner bounds instead of the weird TransformMorph thing. > > As a spike, I wrote: > | transform scale | > scale := self innerBounds width / self image wid

[Pharo-users] Canvas: Transform Width and Height Independently

2015-02-20 Thread Sean P. DeNigris
I'm implementing a SimpleImageMorph which squeezes the form into the Morph's inner bounds instead of the weird TransformMorph thing. As a spike, I wrote: | transform scale | scale := self innerBounds width / self image width. transform := MorphicTransform new setScale: scal