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/NodeStyle.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/NodeStyle.m')
-rw-r--r-- | tikzit/src/common/NodeStyle.m | 6 |
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]; |