Пример #1
0
        protected override void RenderLineAndMarkers(IRenderContext rc, OxyRect clippingRect, IList <ScreenPoint> pointsToRender)
        {
            if (Smooth)
            {
                pointsToRender = CatmullRomSplineHelper.CreateSpline(ScreenPointHelper.ResamplePoints(pointsToRender, MinimumSegmentLength), 0.5,
                                                                     0.25 / _smoothessMultipler);
            }

            if (StrokeThickness > 0.0 && ActualLineStyle != LineStyle.None)
            {
                RenderLine(rc, clippingRect, pointsToRender);
            }

            if (MarkerType != MarkerType.None)
            {
                var binOffset = MarkerResolution > 0 ? Transform(MinX, MinY) : new ScreenPoint();
                rc.DrawMarkers(clippingRect, pointsToRender, MarkerType, MarkerOutline, new[] { MarkerSize }, ActualMarkerFill, MarkerStroke,
                               MarkerStrokeThickness, MarkerResolution, binOffset);
            }
        }
Пример #2
0
 protected override void ResetSmoothedPoints()
 {
     SmoothedPoints = CatmullRomSplineHelper.CreateSpline(ActualPoints, 0.5, Math.Abs(Math.Max(MaxX - MinX, MaxY - MinY) / 200d));
 }