Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/13/08 20:34:02 (16 years ago)
Author:
gkronber
Message:

added override for method ContainsPoint(). #268 (Possibility to open the function-tree of any model (represented as point in the scatter-plot))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Charting/Primitives/FixedSizeCircle.cs

    r2 r563  
    5454                           Size.Height);
    5555    }
     56
     57    public override bool ContainsPoint(PointD point) {
     58      PointD center = Chart.TransformWorldToPixel(this.Point);
     59      PointD x = Chart.TransformWorldToPixel(point);
     60      double xDistance = x.X - center.X;
     61      double yDistance = x.Y - center.Y;
     62
     63      return Size.Height*Size.Height/4.0 >= (xDistance * xDistance + yDistance * yDistance);
     64    }
    5665  }
    5766}
Note: See TracChangeset for help on using the changeset viewer.