The Trunk: Graphics-mt.311.mcz

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

The Trunk: Graphics-mt.311.mcz

commits-2
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.311.mcz

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

Name: Graphics-mt.311
Author: mt
Time: 19 April 2015, 11:43:49.356 am
UUID: cb3b8aaf-4a5a-4e42-9d7e-79ce91334246
Ancestors: Graphics-tfel.310

In addition to scaling and rotating, introduce clipping to Form manipulation interface. Clips around the center of the Form.

=============== Diff against Graphics-tfel.310 ===============

Item was added:
+ ----- Method: Form>>clippedToSize: (in category 'scaling, rotation') -----
+ clippedToSize: aPoint
+   "Return a copy of this form that is clipped to the given size around the center."
+
+ | newForm |
+ newForm := self class extent: aPoint depth: depth.
+ ^ newForm copyBits: ((0@0 corner: aPoint) translateBy: (self extent - aPoint) // 2) from: self at: 0@0
+ clippingBox: newForm boundingBox rule: Form over fillColor: nil!