diff options
author | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-16 16:38:35 +0000 |
---|---|---|
committer | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-16 16:38:35 +0000 |
commit | 525059964fbaf380ad2c3079b965d64e7c6d06d1 (patch) | |
tree | 12f0dda7ee8a3d32b20ca038461287ed58c94378 /tikzit/src/common/Node.h | |
parent | 69ab4ccc98cfd63cc10099de0393dc675b20b646 (diff) |
Some cleanup before calculating proper head and tail endpoints for Edge
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@379 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'tikzit/src/common/Node.h')
-rw-r--r-- | tikzit/src/common/Node.h | 43 |
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. |