The Inbox: EToys-ct.355.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: EToys-ct.355.mcz

commits-2
A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-ct.355.mcz

==================== Summary ====================

Name: EToys-ct.355
Author: ct
Time: 20 September 2019, 7:00:19.740437 pm
UUID: fffa3998-3dea-bf46-ada8-7075405d741c
Ancestors: EToys-mt.354

Add Form>>#scaledToWidth:, an analogon for #scaledToHeight:

=============== Diff against EToys-mt.354 ===============

Item was added:
+ ----- Method: Form>>scaledToWidth: (in category '*Etoys-Squeakland-scaling, rotation') -----
+ scaledToWidth: newWidth
+ "Answer the receiver, scaled such that it has the desired width."
+
+ newWidth = self width ifTrue: [^ self].
+ ^self magnify: self boundingBox by: (newWidth / self width) smoothing: 2.
+ !


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: EToys-ct.355.mcz

Hannes Hirzel
+1

On Fri, 20 Sep 2019 17:00:30 0000, [hidden email]
<[hidden email]> wrote:

> A new version of EToys was added to project The Inbox:
> http://source.squeak.org/inbox/EToys-ct.355.mcz
>
> ==================== Summary ====================
>
> Name: EToys-ct.355
> Author: ct
> Time: 20 September 2019, 7:00:19.740437 pm
> UUID: fffa3998-3dea-bf46-ada8-7075405d741c
> Ancestors: EToys-mt.354
>
> Add Form>>#scaledToWidth:, an analogon for #scaledToHeight:
>
> =============== Diff against EToys-mt.354 ===============
>
> Item was added:
> + ----- Method: Form>>scaledToWidth: (in category
> '*Etoys-Squeakland-scaling, rotation') -----
> + scaledToWidth: newWidth
> + "Answer the receiver, scaled such that it has the desired width."
> +
> + newWidth = self width ifTrue: [^ self].
> + ^self magnify: self boundingBox by: (newWidth / self width) smoothing: 2.
> + !
>
>
>