summaryrefslogtreecommitdiff
path: root/tikzit/src/gtk/Edge+Render.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/gtk/Edge+Render.m')
-rw-r--r--tikzit/src/gtk/Edge+Render.m10
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;
}