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
			};
		}
Ejemplo n.º 2
0
 public void AddLine(PointF point1, PointF point2)
 {
     sink.AddLines(
         new s.DrawingPointF[]
         {
             point1.ToWpf(),
             point2.ToWpf()                   
         });
 }
Ejemplo n.º 3
0
		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
			};
		}
Ejemplo n.º 4
0
        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()
                });
        }
Ejemplo n.º 5
0
        public PointF TransformPoint(PointF p)
        {
            s.DrawingPointF v =
                s.Matrix3x2.TransformPoint(
                    this.Control,
                    p.ToWpf()); // implicit conversion from Vector2 to DrawingPointF

            return v.ToEto();
        }
Ejemplo n.º 6
0
		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;
		}
Ejemplo n.º 7
0
		public PointF TransformPoint (PointF point)
		{
			return control.Transform (point.ToWpf ()).ToEto ();
		}
Ejemplo n.º 8
0
 public void MoveTo(PointF point)
 {
     sink.BeginFigure(
         point.ToWpf(),
         sd.FigureBegin.Filled); // is this correct?
 }