But we can fix that by making this object call any attached object's (like
a dimension only) Draw() function... :-/
*/
- attachedDimension = new Dimension(&position, &endpoint, this);
+ attachedDimension = new Dimension(&position, &endpoint, DTLinear, this);
if (parent != NULL)
parent->Add(attachedDimension);
state = oldState;
}
+// Check to see if the point passed in coincides with any we have. If so, return a
+// pointer to it; otherwise, return NULL.
+/*virtual*/ Vector * Line::GetPointAt(Vector v)
+{
+ if (v == position)
+ return &position;
+ else if (v == endpoint)
+ return &endpoint;
+
+ return 0;
+}
+
#if 0
void Line::SetDimensionOnPoint1(Dimension * dimension)
{
// If they don't pass one in, create it for the caller.
if (dimension == NULL)
{
- dimension = new Dimension(&position, &endpoint, this);
+ dimension = new Dimension(&position, &endpoint, DTLinear, this);
if (parent)
parent->Add(dimension);