Beispiel #1
0
        public CustomLineCap(GraphicsPath?fillPath, GraphicsPath?strokePath, LineCap baseCap, float baseInset)
        {
            IntPtr nativeLineCap;
            int    status = Gdip.GdipCreateCustomLineCap(
                new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath._nativePath),
                new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath._nativePath),
                baseCap, baseInset, out nativeLineCap);

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

            SetNativeLineCap(nativeLineCap);
        }