示例#1
0
        /// <summary>
        /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
        /// by the specified pen.
        /// </summary>
        public void Widen(XPen pen, XMatrix matrix, double flatness)
        {
#if CORE
            // Just do nothing.
#endif
#if CORE__
            throw new NotImplementedException("XGraphicsPath.Widen");
#endif
#if GDI
            try
            {
                Lock.EnterGdiPlus();
                _gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix(), (float)flatness);
            }
            finally { Lock.ExitGdiPlus(); }
#endif
#if WPF || NETFX_CORE
#if !SILVERLIGHT && !NETFX_CORE
            _pathGeometry = _pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#else
            // AG-HACK
            throw new InvalidOperationException("Silverlight/WinRT cannot widen a geometry.");
            // TODO: no, yagni
#endif
#endif
        }
示例#2
0
        /// <summary>
        /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
        /// </summary>
        public void Flatten(XMatrix matrix)
        {
#if CORE
            // Just do nothing.
#endif
#if GDI
            try
            {
                Lock.EnterGdiPlus();
                _gdipPath.Flatten(matrix.ToGdiMatrix());
            }
            finally { Lock.ExitGdiPlus(); }
#endif
#if WPF || NETFX_CORE
#if !SILVERLIGHT && !NETFX_CORE
            _pathGeometry = _pathGeometry.GetFlattenedPathGeometry();
            _pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#else
            // AGHACK
            throw new InvalidOperationException("Silverlight/WinRT cannot flatten a geometry.");
            // TODO: no, yagni
#endif
#endif
        }
示例#3
0
        /// <summary>
        /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
        /// </summary>
        public void Flatten(XMatrix matrix, double flatness)
        {
#if CORE
            // Just do nothing.
#endif
#if CORE___
            throw new NotImplementedException("XGraphicsPath.Flatten");
#endif
#if GDI
            try
            {
                Lock.EnterGdiPlus();
                _gdipPath.Flatten(matrix.ToGdiMatrix(), (float)flatness);
            }
            finally { Lock.ExitGdiPlus(); }
#endif
#if WPF || NETFX_CORE
#if !SILVERLIGHT && !NETFX_CORE
            _pathGeometry = _pathGeometry.GetFlattenedPathGeometry();
            // TODO: matrix handling not yet tested
            if (!matrix.IsIdentity)
                _pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#else
            // AG-HACK
            throw new InvalidOperationException("Silverlight/WinRT cannot flatten a geometry.");
            // TODO: no, yagni
#endif
#endif
        }
示例#4
0
    /// <summary>
    /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
    /// by the specified pen.
    /// </summary>
    public void Widen(XPen pen, XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
      this.pathGeometry = this.pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#endif
    }
示例#5
0
    /// <summary>
    /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
    /// </summary>
    public void Flatten(XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Flatten(matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
      // TODOWPF: matrix
      this.pathGeometry = this.pathGeometry.GetFlattenedPathGeometry();
#endif
    }
示例#6
0
    /// <summary>
    /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
    /// </summary>
    public void Flatten(XMatrix matrix)
    {
#if GDI
      this.gdipPath.Flatten(matrix.ToGdiMatrix());
#endif
#if WPF
      this.pathGeometry = this.pathGeometry.GetFlattenedPathGeometry();
      this.pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#endif
    }
示例#7
0
    /// <summary>
    /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
    /// by the specified pen.
    /// </summary>
    public void Widen(XPen pen, XMatrix matrix)
    {
#if GDI
      this.gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix());
#endif
#if WPF
#if !SILVERLIGHT
      this.pathGeometry = this.pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#else
      // AGHACK
#endif
#endif
    }
示例#8
0
    /// <summary>
    /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
    /// </summary>
    public void Flatten(XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Flatten(matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
#if !SILVERLIGHT
      this.pathGeometry = this.pathGeometry.GetFlattenedPathGeometry();
      // TODO: matrix handling not yet tested
      if (!matrix.IsIdentity)
        this.pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#else
      // AGHACK
#endif
#endif
    }