Programmer's Reference
In Smalltalk, Points are commonly written as "A@B", where A
and B are numbers.
- Note:
- This proves to be a convenient denotation because it also evaluates to a
Point instance.
Smalltalk conforms to the usual convention in plane geometry in that the
first, or x-coordinate of a Point represents the horizontal
dimension, and the second or y-coordinate represents the vertical
dimension.
- Note:
- A CLDT convention is that the point 0@0 (the origin) is in the upper left
corner of the screen. The x-coordinate increases as a Point
moves to the right, and the y-coordinate increases as it moves down. In
some cases this does not conform to the usual conventions for the platform GUI
(for example, in OS/2 Presentation Manager the origin is the lower left
corner). CLDT imposes a uniform definition of origin to facilitate
portability.
x, x:, y, y:
*, +, -, /, //,
abs, negated
- Porting tip:
- The arithmetic messages quo:, rem:, and
\\ are defined in Objectworks\Smalltalk, but they are
not specified by the Blue Book, and have not been included in IBM
Smalltalk.
x:y:
<, <=, =, >,
>=, between:and:, max:,
min:
dotProduct:, dist:, normal,
transpose
- Note:
- While not often used, these messages have been included because they are
defined in the Blue Book. Objectworks\Smalltalk provides an
even more extensive library of such functions, and support for polar
coordinates, presumably to support complex computational geometry
algorithms. Given the tendency in modern systems to use platform
graphics routines, or even graphics processors, these functions have not been
included in CLDT.
- Porting tip:
- Smalltalk/V does not support dist: or
normal.
corner:, extent:
rounded, truncated, truncatedGrid:,
truncateTo:
- Porting tip:
- Smalltalk/V does not support truncatedGrid: or
truncateTo:.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]