private unsafe PathData _GetPathData()
        {
            int count = PointCount;

            PathData pathData = new PathData()
            {
                Types  = new byte[count],
                Points = new PointF[count]
            };

            if (count == 0)
            {
                return(pathData);

                fixed(byte *t = pathData.Types)
                fixed(PointF * p = pathData.Points)
                {
                    GpPathData data = new GpPathData
                    {
                        Count  = count,
                        Points = p,
                        Types  = t
                    };

                    int status = SafeNativeMethods.Gdip.GdipGetPathData(new HandleRef(this, nativePath), &data);

                    if (status != SafeNativeMethods.Gdip.Ok)
                    {
                        throw SafeNativeMethods.Gdip.StatusException(status);
                    }
                }

                return(pathData);
        }
Exemple #2
0
        private unsafe PathData _GetPathData()
        {
            int count = PointCount;

            PathData pathData = new PathData()
            {
                Types  = new byte[count],
                Points = new PointF[count]
            };

            if (count == 0)
            {
                return(pathData);

                fixed(byte *t = pathData.Types)
                fixed(PointF * p = pathData.Points)
                {
                    GpPathData data = new GpPathData
                    {
                        Count  = count,
                        Points = p,
                        Types  = t
                    };

                    Gdip.CheckStatus(Gdip.GdipGetPathData(new HandleRef(this, _nativePath), &data));
                }

                return(pathData);
        }
Exemple #3
0
GdipGetPathData(GpPath path, out GpPathData pathData);
Exemple #4
0
 public static extern GpStatus GdipGetPathData(GpPath path, out GpPathData pathData);