Next: 1.3 NSRect Up: 1 Points, Sizes and Previous: 1.1 NSPoint

1.2 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.