The Trunk: EToys-ct.355.mcz

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

The Trunk: EToys-ct.355.mcz

commits-2
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/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.
+ !