Пример #1
0
        /// <summary>
        /// Starts a new figure at the specified point.
        /// </summary>
        /// <param name="startPoint">The point at which to begin the new figure.</param>
        /// <param name="figureBegin">Whether the new figure should be hollow or filled.</param>
        /// <unmanaged>void BeginFigure([None] D2D1_POINT_2F startPoint,[None] D2D1_FIGURE_BEGIN figureBegin)</unmanaged>
        /// <remarks>
        /// If this method is called while a figure is currently in progress, the interface is invalidated and all future methods will fail.
        /// </remarks>
        public void BeginFigure(SharpDX.Mathematics.Interop.RawVector2 startPoint, FigureBegin figureBegin)
        {
            m_currentPolygonBuilder.Clear();
            m_currentPolygonBuilder.Add(new Vector2(startPoint.X, startPoint.Y) - m_origin);

            m_currentFigureBegin = figureBegin;
        }
            private static void BeginFigureImpl(IntPtr thisPtr, PointF startPoint, FigureBegin figureBegin)
            {
                var shadow   = ToShadow <ID2D1SimplifiedGeometrySinkShadow>(thisPtr);
                var callback = (ID2D1SimplifiedGeometrySink)shadow.Callback;

                callback.BeginFigure(startPoint, figureBegin);
            }
Пример #3
0
        public void BeginFigure(SharpDX.Mathematics.Interop.RawVector2 startPoint, FigureBegin figureBegin)
        {
            this.m_figureVertices.Clear();

            Vertex2D v = new Vertex2D()
            {
                pt     = *(Vector2 *)&startPoint,
                inter1 = Vector2.Zero,
                inter2 = Vector2.Zero,
                norm   = Vector2.Zero
            };

            this.m_figureVertices.Add(v);
        }
Пример #4
0
        private static SharpDX.Direct2D1.FigureBegin GetD2DFigureFlag(FigureBegin figureBegin)
        {
            switch (figureBegin)
            {
            case FigureBegin.Filled:
                return(SharpDX.Direct2D1.FigureBegin.Filled);

            case FigureBegin.Hollow:
                return(SharpDX.Direct2D1.FigureBegin.Hollow);

            default:
                throw new ArgumentOutOfRangeException("figureBegin");
            }
        }
Пример #5
0
 public static void BeginFigure(this GeometrySink target, float x, float y, FigureBegin begin)
 {
     target.BeginFigure(new Vector2(x, y), begin);
 }
Пример #6
0
 public void BeginFigure(FigureBegin figureBegin, PointF startPoint)
 {
     m_geometrySink.BeginFigure(startPoint.InternalPointF, (SlimDX.Direct2D.FigureBegin)figureBegin);
 }
Пример #7
0
        private PathGeometry CreateArc(float cx, float cy, float radius, float startAngle, float endAngle, FigureBegin begin, FigureEnd end)
        {
            var geometry = new PathGeometry(d2dFactory);

            using (var sink = geometry.Open())
            {
                var sa = -startAngle;
                var ea = -endAngle;

                sink.BeginFigure(
                    new Vector2(
                        cx + radius * (float)Math.Cos(sa),
                        cy + radius * (float)Math.Sin(sa)),
                    begin);

                var segment = new ArcSegment()
                {
                    Point = new Vector2(
                        cx + radius * (float)Math.Cos(ea),
                        cy + radius * (float)Math.Sin(ea)),
                    Size           = new DrawingSizeF(radius, radius),
                    SweepDirection = SweepDirection.CounterClockwise
                };
                sink.AddArc(segment);
                sink.EndFigure(end);
                sink.Close();
            }
            return(geometry);
        }
Пример #8
0
 public void BeginFigure(Vector2 v, FigureBegin fb)
 {
 }
Пример #9
0
 void SimplifiedGeometrySink.BeginFigure(DrawingPointF startPoint, FigureBegin figureBegin)
 {
     _Builder.MoveTo(startPoint.X, startPoint.Y);
 }
Пример #10
0
 public void BeginFigure(PointF startPoint, FigureBegin figureBegin)
 {
     this._buffer.AppendFormat("M {0},{1} ", startPoint.X, startPoint.Y);
 }
 public void BeginFigure(DrawingPointF startPoint, FigureBegin figureBegin)
 {
     BeginFigure_(startPoint, figureBegin);
 }
Пример #12
0
 public void BeginFigure(PointF startPoint, FigureBegin figureBegin)
 {
     this._buffer.AppendFormat("M {0},{1} ", startPoint.X, startPoint.Y);
 }
Пример #13
0
 public void BeginFigure(PointFloat startPoint, FigureBegin figureBegin)
 {
     base.innerRefT.BeginFigure(startPoint, figureBegin);
 }
 public void BeginFigure(Vector2 startPoint, FigureBegin figureBegin) => BeginFigure_(startPoint, figureBegin);
Пример #15
0
        public void BeginFigure(SharpDX.Mathematics.Interop.RawVector2 startPoint, FigureBegin figureBegin)
        {
            this.m_figureVertices.Clear();

            Vertex2D v = new Vertex2D()
            {
                pt = startPoint,
                inter1 = Vector2.Zero,
                inter2 = Vector2.Zero,
                norm = Vector2.Zero
            };
            this.m_figureVertices.Add(v);
        }
 public void BeginFigure(PointF startPoint, FigureBegin figureBegin) => BeginFigure_(startPoint, figureBegin);
Пример #17
0
 public void BeginFigure(Vector2 point, FigureBegin figureBegin)
 {
     isFigureOpened = true;
     geometrySink.BeginFigure(point, GetD2DFigureFlag(figureBegin));
 }
Пример #18
0
 public void BeginFigure(SharpDX.Mathematics.Interop.RawVector2 startPoint, FigureBegin figureBegin)
 {
 }
 /// <summary>
 /// Starts a new figure at the specified point.
 /// </summary>
 /// <param name="startPoint">The point at which to begin the new figure.</param>
 /// <param name="figureBegin">Whether the new figure should be hollow or filled.</param>
 /// <remarks>
 /// If this method is called while a figure is currently in progress, the interface is invalidated and all future methods will fail.
 /// </remarks>
 public void BeginFigure(RawVector2 startPoint, FigureBegin figureBegin)
 {
     BeginFigure_(startPoint, figureBegin);
 }
Пример #20
0
 public void BeginFigure(Point p, FigureBegin fb)
 {
 }