summaryrefslogtreecommitdiff
path: root/tikzit/src/common/NodeStyle.m
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2012-05-23 17:39:58 +0100
committerAlex Merry <alex.merry@cs.ox.ac.uk>2012-05-23 17:39:58 +0100
commit5dcbea7d268bf1be9548226665bce6a24e2e9d55 (patch)
treea317534bb0682eb53621c2a163bb776a2851b7c7 /tikzit/src/common/NodeStyle.m
parent33a1af9afed49f43f3577acb213ab0469035730f (diff)
Start fixing shapes in the preamble
RegularPolyShape needs fixing still, and the tikz shapes need sorting out.
Diffstat (limited to 'tikzit/src/common/NodeStyle.m')
-rw-r--r--tikzit/src/common/NodeStyle.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/tikzit/src/common/NodeStyle.m b/tikzit/src/common/NodeStyle.m
index 0794b6a..268715b 100644
--- a/tikzit/src/common/NodeStyle.m
+++ b/tikzit/src/common/NodeStyle.m
@@ -22,6 +22,7 @@
//
#import "NodeStyle.h"
+#import "Shape.h"
#import "ShapeNames.h"
@implementation NodeStyle
@@ -191,9 +192,12 @@
if (fillName == nil) fillName = [fillColorRGB hexName];
if (strokeName == nil) strokeName = [strokeColorRGB hexName];
+ NSString *shapeDesc = [[Shape shapeForName:shapeName] styleTikz];
+ if (shapeDesc == nil) shapeDesc = shapeName;
+
return [NSString stringWithFormat:@"\\tikzstyle{%@}=[%@,fill=%@,draw=%@%@]",
name,
- shapeName,
+ shapeDesc,
fillName,
strokeName,
stroke];