public object Create (Color startColor, Color endColor, PointF startPoint, PointF endPoint) { return new swm.LinearGradientBrush (startColor.ToWpf (), endColor.ToWpf (), startPoint.ToWpf (), endPoint.ToWpf ()) { MappingMode = swm.BrushMappingMode.Absolute, SpreadMethod = swm.GradientSpreadMethod.Repeat }; }
public void AddLine(PointF point1, PointF point2) { sink.AddLines( new s.DrawingPointF[] { point1.ToWpf(), point2.ToWpf() }); }
public object Create(Color startColor, Color endColor, PointF center, PointF gradientOrigin, SizeF radius) { return new swm.RadialGradientBrush(startColor.ToWpf(), endColor.ToWpf()) { Center = center.ToWpf(), GradientOrigin = gradientOrigin.ToWpf(), RadiusX = radius.Width, RadiusY = radius.Height, MappingMode = swm.BrushMappingMode.Absolute, SpreadMethod = swm.GradientSpreadMethod.Pad }; }
public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4) { sink.AddLine(pt1.ToWpf()); sink.AddBezier( new sd.BezierSegment { Point1 = pt2.ToWpf(), Point2 = pt3.ToWpf(), Point3 = pt4.ToWpf() }); }
public PointF TransformPoint(PointF p) { s.DrawingPointF v = s.Matrix3x2.TransformPoint( this.Control, p.ToWpf()); // implicit conversion from Vector2 to DrawingPointF return v.ToEto(); }
public void AddBezier (PointF start, PointF control1, PointF control2, PointF end) { ConnectTo (start.ToWpf ()); figure.Segments.Add (new swm.BezierSegment (control1.ToWpf (), control2.ToWpf (), end.ToWpf (), true)); CurrentPoint = end; }
public PointF TransformPoint (PointF point) { return control.Transform (point.ToWpf ()).ToEto (); }
public void MoveTo(PointF point) { sink.BeginFigure( point.ToWpf(), sd.FigureBegin.Filled); // is this correct? }