/// <summary> /// Gets the first and second value of a point (should only be used for Line, Ellipsis, Rectangle annotations) /// and uses a selector function to select one of the values. /// </summary> private float ValComp(Func <float, float, float> selector, Func <AnnotationPoint, float> get) { if (Annotation.Points.Count < 2) { return(0); } var pt1 = AnnotationPointTransformer.ConvertFromStandardRangeToSurface(Annotation.Points[0], _surfaceSize); var pt2 = AnnotationPointTransformer.ConvertFromStandardRangeToSurface(Annotation.Points[1], _surfaceSize); return(selector(get(pt1), get(pt2))); }
/// <summary> /// Gets the point at an index and converts it to a float value /// </summary> private float ValAtIndex(int index, Func <AnnotationPoint, float> get) { return(get(AnnotationPointTransformer.ConvertFromStandardRangeToSurface(Annotation.Points[index], _surfaceSize))); }