コード例 #1
0
        public PathGradientBrush(PointF[] points, System.Drawing.Drawing2D.WrapMode wrapMode)
        {
            if (points == null)
            {
                throw new ArgumentNullException("points");
            }
            if (!System.Drawing.ClientUtils.IsEnumValid(wrapMode, (int)wrapMode, 0, 4))
            {
                throw new InvalidEnumArgumentException("wrapMode", (int)wrapMode, typeof(System.Drawing.Drawing2D.WrapMode));
            }
            IntPtr zero   = IntPtr.Zero;
            IntPtr handle = SafeNativeMethods.Gdip.ConvertPointToMemory(points);

            try
            {
                int status = SafeNativeMethods.Gdip.GdipCreatePathGradient(new HandleRef(null, handle), points.Length, (int)wrapMode, out zero);
                if (status != 0)
                {
                    throw SafeNativeMethods.Gdip.StatusException(status);
                }
                base.SetNativeBrushInternal(zero);
            }
            finally
            {
                if (handle != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(handle);
                }
            }
        }
コード例 #2
0
        private void _SetWrapMode(System.Drawing.Drawing2D.WrapMode wrapMode)
        {
            int status = SafeNativeMethods.Gdip.GdipSetPathGradientWrapMode(new HandleRef(this, base.NativeBrush), (int)wrapMode);

            if (status != 0)
            {
                throw SafeNativeMethods.Gdip.StatusException(status);
            }
        }
コード例 #3
0
 public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.Color color, bool clamp)
 {
 }
コード例 #4
0
 public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode)
 {
 }
コード例 #5
0
 public TextureBrush(Image image, System.Drawing.Drawing2D.WrapMode wrapMode)
 {
 }
コード例 #6
0
 public TextureBrush(Image image, System.Drawing.Drawing2D.WrapMode wrapMode, Rectangle dstRect)
 {
 }