Example #1
0
        public override object Clone()
        {
            IntPtr cloneBrush = IntPtr.Zero;
            int    status     = Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out cloneBrush);

            Gdip.CheckStatus(status);

            return(new TextureBrush(cloneBrush));
        }
Example #2
0
        public override object Clone()
        {
            IntPtr clonedBrush;
            int    status = Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out clonedBrush);

            Gdip.CheckStatus(status);

            return(new LinearGradientBrush(clonedBrush));
        }
Example #3
0
        public override object Clone()
        {
            IntPtr clonedBrush;
            int    status = Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out clonedBrush);

            Gdip.CheckStatus(status);

            // Clones of immutable brushes are not immutable.
            return(new SolidBrush(clonedBrush));
        }
Example #4
0
        public override object Clone()
        {
            int status = Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out IntPtr clonedBrush);

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

            return(new PathGradientBrush(clonedBrush));
        }
 public override object Clone()
 {
     Gdip.CheckStatus(Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out IntPtr clonedBrush));
     return(new PathGradientBrush(clonedBrush));
 }