diff options
author | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-04-18 13:45:43 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-04-18 13:45:43 +0100 |
commit | 2f6a98730f6af18a71b31c72468042f3b5b81915 (patch) | |
tree | 63dc3ece2a7ca80be03f5c32add0edc3d9693ce0 /tikzit/src/gtk/Edge+Render.m | |
parent | b9c39efd55a5dd03a52e0ac3da191fed763f53db (diff) |
Add edge colours
Diffstat (limited to 'tikzit/src/gtk/Edge+Render.m')
-rw-r--r-- | tikzit/src/gtk/Edge+Render.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tikzit/src/gtk/Edge+Render.m b/tikzit/src/gtk/Edge+Render.m index 61a78d7..d69a9ad 100644 --- a/tikzit/src/gtk/Edge+Render.m +++ b/tikzit/src/gtk/Edge+Render.m @@ -195,13 +195,21 @@ static const float cpLineWidth = 1.0; } } +- (RColor) color { + if (style) { + return [[style colorRGB] rColor]; + } else { + return WhiteRColor; + } +} + - (void) renderBasicEdgeInContext:(id<RenderContext>)context withTransformer:(Transformer*)t selected:(BOOL)selected { [self updateControls]; [context saveState]; const CGFloat lineWidth = style ? [style thickness] : edgeWidth; [context setLineWidth:lineWidth]; - RColor color = BlackRColor; + RColor color = [self color]; if (selected) { color.alpha = 0.5; } |