summaryrefslogtreecommitdiff
path: root/tikzit/src/common/Node.h
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/common/Node.h')
-rw-r--r--tikzit/src/common/Node.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/tikzit/src/common/Node.h b/tikzit/src/common/Node.h
index 73a4653..c3a604d 100644
--- a/tikzit/src/common/Node.h
+++ b/tikzit/src/common/Node.h
@@ -29,6 +29,9 @@
#import "NodeStyle.h"
#import "GraphElementData.h"
+@class Shape;
+@class Transformer;
+
/*!
@class Node
@brief A graph node, with associated location and style data.
@@ -42,6 +45,14 @@
}
/*!
+ @property shape
+ @brief The shape to use
+ @detail This is a convenience property that resolves the shape name
+ from the style, and uses a circle if there is no style.
+ */
+@property (readonly) Shape *shape;
+
+/*!
@property point
@brief The point where this node is located.
*/
@@ -86,6 +97,38 @@
- (id)init;
/*!
+ @brief Composes the shape transformer with another transformer
+ @param t The transform to apply before the shape transform
+ @result A transformer that first maps according to t, then according
+ to -shapeTransformer.
+ */
+- (Transformer*) shapeTransformerFromTransformer:(Transformer*)t;
+
+/*!
+ @brief A transformer that may be used to convert the shape to the
+ right position and scale
+ */
+- (Transformer*) shapeTransformer;
+
+/*!
+ @brief The bounding rect in the given co-ordinate system
+ @detail This is the bounding rect of the shape (after being
+ suitably translated and scaled). The label is not
+ considered.
+ @param shapeTrans The mapping from graph co-ordinates to the required
+ co-ordinates
+ @result The bounding rectangle
+ */
+- (NSRect) boundsUsingShapeTransform:(Transformer*)shapeTrans;
+
+/*!
+ @brief The bounding rect in graph co-ordinates
+ @detail This is the bounding rect of the shape (after being suitably
+ translated and scaled). The label is not considered.
+ */
+- (NSRect) boundingRect;
+
+/*!
@brief Try to attach a style of the correct name from the given style list.
@param styles an array of styles.
@result YES if successfully attached, NO otherwise.