[Pkg] The Trunk: Graphics-nice.146.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jul 25 13:00:20 UTC 2010
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.146.mcz
==================== Summary ====================
Name: Graphics-nice.146
Author: nice
Time: 25 July 2010, 2:59:32.851 pm
UUID: b137d815-9abe-40b6-9f7f-f24057b9d25e
Ancestors: Graphics-nice.145
Provides a more verbose Rectangle comment advertising about usual conventions and degenerated (empty) Rectangles.
=============== Diff against Graphics-nice.145 ===============
Item was changed:
Object subclass: #Rectangle
instanceVariableNames: 'origin corner'
classVariableNames: ''
poolDictionaries: ''
category: 'Graphics-Primitives'!
+ !Rectangle commentStamp: 'nice 7/25/2010 14:56' prior: 0!
+ I represent a rectangular area of the screen. Arithmetic functions take points as arguments and carry out scaling and translating operations to create new instances of me. Rectangle functions create new instances by determining intersections of rectangles with rectangles.
+
+ Note 1: only rectangles parallel to reference frame (Screen) can be represented by this class.
+
+ Note 2: the Rectangle is represented by two extremities of one diagonal. By convention, it must be the diagonal:
+ from rectangle origin (the point having smallest coordinates in reference frame),
+ to rectangle corner (the point having largest coordinates in reference frame).
+
+ Note 3: Screen coordinates conventions are:
+ x is horizontal axis, zero at left border, oriented toward right;
+ y is vertical axis, zero at top border, oriented toward bottom.
+ This corresponds to the latin convention for writing text from left to right and top to bottom.
+
+ Note 4: the Rectangle extent is obtained by subtracting rectangle origin to rectangle corner coordinates.
+ If this leads to a negative width (extent x coordinate) and/or a negative height (extent y coordinate), then the Rectangle is degenerated and considered empty.
+
+ Instance variables:
+ origin <Point> the coordinates of corner having smallest coordinates (top left in Screen coordinates)
+ corner <Point> the coordinates of corner having largest coordinates (bottom right in Screen coordinates)
+ !
- !Rectangle commentStamp: '<historical>' prior: 0!
- I represent a rectangular area of the screen. Arithmetic functions take points as arguments and carry out scaling and translating operations to create new instances of me. Rectangle functions create new instances by determining intersections of rectangles with rectangles.!
More information about the Packages
mailing list