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