X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fline.cpp;h=880a79d60bc48254645794628ce1cb69dbe246fb;hb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;hp=2459636024e8be411f17f6d8994c037b27ae7d68;hpb=9d5d4488ba75c407709556a7ed56b8d16e21834e;p=architektonas diff --git a/src/line.cpp b/src/line.cpp index 2459636..880a79d 100644 --- a/src/line.cpp +++ b/src/line.cpp @@ -132,7 +132,7 @@ level container, it won't get drawn... 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); @@ -360,6 +360,18 @@ about keeping track of old states... 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) { @@ -382,7 +394,7 @@ void Line::SetDimensionOnLine(Dimension * dimension/*=NULL*/) // 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);