Next: NSRect Up: Points, Sizes and Rectangles Previous: NSPoint

NSSize

An NSSize is a struct describing the size of a rectangle, regardless of its position.
typedef struct _NSSize
{
  float width;
  float height;
} NSSize;
Using NSSize is completely analogous to using NSPoint, as in the following code example:
NSSize testSize;

testSize = NSMakeSize (0.5, 51);
NSLog (@"x coordinate: %f", testSize.width); // 0.5
NSLog (@"y coordinate: %f", testSize.height); // 51
NSZeroSize is a constant equal to a size with zero width and zero height.



Nicola Pero 2000-07-29