Inherits from NSObject
Conforms to NSCoding
Declared in M2Object.h
M2Object.m

Overview

Represents data in one object. This class is used in M2LibObject to store objects in library and in M2CanvasObjects to compose objects on the canvas.

Tasks

Managing bounds

Managing paths

Properties

bounds

Size of objects. Bezier paths must be inside this bounds.

@property (assign) NSSize bounds

Discussion

Size of objects. Bezier paths must be inside this bounds.

Declared In

M2Object.h

paths

Array of paths. Each entry is a NSDictionary with the following keys:

@property (retain) NSMutableArray *paths

Discussion

Array of paths. Each entry is a NSDictionary with the following keys:

  • path: NSBezierPath with path of object element
  • background: Background color of path
  • stroke: Stroke color of path

Declared In

M2Object.h

Instance Methods

addPath:

Adds path to object with default colors

- (void)addPath:(NSBezierPath *)path

Discussion

Adds path to object with default colors

Declared In

M2Object.h

addPath:withBackground:stroke:

Adds path to object, with specified colors for background and stroke.

- (void)addPath:(NSBezierPath *)path withBackground:(NSColor *)background stroke:(NSColor *)stroke

Discussion

Adds path to object, with specified colors for background and stroke.

Declared In

M2Object.h