diff options
author | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-17 18:39:31 +0000 |
---|---|---|
committer | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-17 18:39:31 +0000 |
commit | f90dd4ffc4b679e61a2a8cf43853b7d3c72c3e83 (patch) | |
tree | 15842d8311e621dc2776a77c9740bd72784f13f1 /tikzit/src/common/Node.m | |
parent | 18871fdd7bbfb43eb0971ee358554f321f789eee (diff) |
Calculate the head and tail of edges to be just where they contact the node (ie: behave more like tikz).
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@388 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'tikzit/src/common/Node.m')
-rw-r--r-- | tikzit/src/common/Node.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tikzit/src/common/Node.m b/tikzit/src/common/Node.m index 8880826..136fe20 100644 --- a/tikzit/src/common/Node.m +++ b/tikzit/src/common/Node.m @@ -24,7 +24,6 @@ #import "Node.h" #import "Shape.h" -#import "ShapeNames.h" @implementation Node @@ -48,7 +47,7 @@ if (style) { return [Shape shapeForName:[style shapeName]]; } else { - return [Shape shapeForName:SHAPE_CIRCLE]; + return nil; } } @@ -74,10 +73,13 @@ } - (NSRect) boundsUsingShapeTransform:(Transformer*)shapeTrans { - float strokeThickness = style ? [style strokeThickness] : [NodeStyle defaultStrokeThickness]; - NSRect screenBounds = [shapeTrans rectToScreen:[[self shape] boundingRect]]; - screenBounds = NSInsetRect(screenBounds, -strokeThickness, -strokeThickness); - return screenBounds; + //if (style) { + return [shapeTrans rectToScreen:[[self shape] boundingRect]]; + /*} else { + NSRect r = NSZeroRect; + r.origin = [shapeTrans toScreen:[self point]]; + return r; + }*/ } - (NSRect) boundingRect { |