Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorModel/Paths/SvgPathSegMovetoRel.cs @ 13757

Last change on this file since 13757 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 791 bytes
Line 
1// <developer>niklas@protocol7.com</developer>
2// <completed>100</completed>
3
4using System;
5
6namespace SharpVectors.Dom.Svg
7{
8  /// <summary>
9  /// The SvgPathSegMovetoRel interface corresponds to an "relative moveto" (m) path data command.
10  /// </summary>
11    public sealed class SvgPathSegMovetoRel : SvgPathSegMoveto, ISvgPathSegMovetoRel
12  {
13        public SvgPathSegMovetoRel(double x, double y)
14            : base(SvgPathSegType.MoveToRel, x, y)
15    {
16    }
17
18    public override SvgPointF AbsXY
19    {
20      get
21      {
22        SvgPathSeg prevSeg = PreviousSeg;
23        SvgPointF prevPoint;
24        if (prevSeg == null)
25                    prevPoint = new SvgPointF(0,0);
26        else prevPoint = prevSeg.AbsXY;
27        return new SvgPointF(prevPoint.X + X, prevPoint.Y + Y);
28      }
29    }
30  }
31}
Note: See TracBrowser for help on using the repository browser.