diff options
author | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-05-23 17:39:58 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-05-23 17:39:58 +0100 |
commit | 5dcbea7d268bf1be9548226665bce6a24e2e9d55 (patch) | |
tree | a317534bb0682eb53621c2a163bb776a2851b7c7 /tikzit/src/common/Shape.m | |
parent | 33a1af9afed49f43f3577acb213ab0469035730f (diff) |
Start fixing shapes in the preamble
RegularPolyShape needs fixing still, and the tikz shapes need sorting
out.
Diffstat (limited to 'tikzit/src/common/Shape.m')
-rw-r--r-- | tikzit/src/common/Shape.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tikzit/src/common/Shape.m b/tikzit/src/common/Shape.m index 8714031..b74a9fc 100644 --- a/tikzit/src/common/Shape.m +++ b/tikzit/src/common/Shape.m @@ -21,14 +21,18 @@ // along with TikZiT. If not, see <http://www.gnu.org/licenses/>. // -#import "Edge.h" #import "Shape.h" + +#import "Edge.h" #import "SupportDir.h" #import "ShapeNames.h" + #import "CircleShape.h" +#import "DiamondShape.h" #import "RectangleShape.h" #import "RegularPolyShape.h" #import "TikzShape.h" + #import "util.h" @implementation Shape @@ -63,14 +67,18 @@ - (NSRect)boundingRect { return boundingRect; } +@synthesize styleTikz; + - (id)copyWithZone:(NSZone*)zone { Shape *cp = [[[self class] allocWithZone:zone] init]; [cp setPaths:paths]; + [cp setStyleTikz:styleTikz]; return cp; } - (void)dealloc { [paths release]; + [styleTikz release]; [super dealloc]; } @@ -101,7 +109,7 @@ NSDictionary *shapeDictionary = nil; Shape *shapes[5] = { [[CircleShape alloc] init], [[RectangleShape alloc] init], - [[RegularPolyShape alloc] initWithSides:4 rotation:(M_PI/2.0f)], + [[DiamondShape alloc] init], [[RegularPolyShape alloc] initWithSides:3 rotation:(M_PI/2.0f)], [[RegularPolyShape alloc] initWithSides:3 rotation:(-M_PI/2.0f)]}; NSMutableDictionary *shapeDict = [[NSMutableDictionary alloc] initWithObjectsAndKeys: |