Last change
on this file since 13599 was
12762,
checked in by aballeit, 9 years ago
|
#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Text;
|
---|
3 |
|
---|
4 | namespace SharpVectors.Dom.Svg
|
---|
5 | {
|
---|
6 | public sealed class SvgPathSegLinetoHorizontalRel : SvgPathSegLineto, ISvgPathSegLinetoHorizontalRel
|
---|
7 | {
|
---|
8 | private double x;
|
---|
9 |
|
---|
10 | public SvgPathSegLinetoHorizontalRel(double x)
|
---|
11 | : base(SvgPathSegType.LineToHorizontalRel)
|
---|
12 | {
|
---|
13 | this.x = x;
|
---|
14 | }
|
---|
15 |
|
---|
16 | public double X
|
---|
17 | {
|
---|
18 | get { return x; }
|
---|
19 | set { x = value; }
|
---|
20 | }
|
---|
21 |
|
---|
22 | public override SvgPointF AbsXY
|
---|
23 | {
|
---|
24 | get
|
---|
25 | {
|
---|
26 | SvgPathSeg prevSeg = PreviousSeg;
|
---|
27 | SvgPointF prevPoint;
|
---|
28 | if (prevSeg == null) prevPoint = new SvgPointF(0, 0);
|
---|
29 | else prevPoint = prevSeg.AbsXY;
|
---|
30 | return new SvgPointF(prevPoint.X + X, prevPoint.Y);
|
---|
31 | }
|
---|
32 | }
|
---|
33 |
|
---|
34 | public override string PathText
|
---|
35 | {
|
---|
36 | get
|
---|
37 | {
|
---|
38 | StringBuilder sb = new StringBuilder();
|
---|
39 | sb.Append(PathSegTypeAsLetter);
|
---|
40 | sb.Append(X);
|
---|
41 |
|
---|
42 | return sb.ToString();
|
---|
43 | }
|
---|
44 | }
|
---|
45 | }
|
---|
46 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.