summaryrefslogtreecommitdiff
path: root/tikzit/src/common/NodeStyle.m
diff options
context:
space:
mode:
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];