diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-22 19:30:07 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-22 19:30:07 +0000 |
commit | 3fb7711dd09975c83de5995d5247cbdd8d150def (patch) | |
tree | ccb8f903ededd89f50acac51c283523aeebef4c8 /tikzit/src/common | |
parent | 7a639879e0446bd355fa52e2e347735f57d7abf9 (diff) |
Add debugging option to Select tool
Selecting edges and/or nodes and pressing shift-d will print info about
them to the console.
Diffstat (limited to 'tikzit/src/common')
-rw-r--r-- | tikzit/src/common/Edge.h | 4 | ||||
-rw-r--r-- | tikzit/src/common/Edge.m | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tikzit/src/common/Edge.h b/tikzit/src/common/Edge.h index cc636dd..64da138 100644 --- a/tikzit/src/common/Edge.h +++ b/tikzit/src/common/Edge.h @@ -222,6 +222,8 @@ typedef enum { */ @property (readonly) NSPoint rightNormal; +@property (readonly) NSPoint headTan; + /*! @property leftHeadNormal */ @@ -232,6 +234,8 @@ typedef enum { */ @property (readonly) NSPoint rightHeadNormal; +@property (readonly) NSPoint tailTan; + /*! @property leftTailNormal */ diff --git a/tikzit/src/common/Edge.m b/tikzit/src/common/Edge.m index f9cb9b5..cabf860 100644 --- a/tikzit/src/common/Edge.m +++ b/tikzit/src/common/Edge.m @@ -228,6 +228,11 @@ return NSMakePoint(mid.x - (mid.y - midTan.y), mid.y + (mid.x - midTan.x)); } +- (NSPoint)headTan { + [self updateControls]; + return headTan; +} + - (NSPoint)leftHeadNormal { [self updateControls]; return NSMakePoint(headTan.x + (head.y - headTan.y), headTan.y - (head.x - headTan.x)); @@ -238,6 +243,11 @@ return NSMakePoint(headTan.x - (head.y - headTan.y), headTan.y + (head.x - headTan.x)); } +- (NSPoint)tailTan { + [self updateControls]; + return tailTan; +} + - (NSPoint)leftTailNormal { [self updateControls]; return NSMakePoint(tailTan.x + (tail.y - tailTan.y), tailTan.y - (tail.x - tailTan.x)); |