Beispiel #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));
        }
        public override object Clone()
        {
            IntPtr clonedBrush;
            int    status = Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out clonedBrush);

            Gdip.CheckStatus(status);

            return(new LinearGradientBrush(clonedBrush));
        }
Beispiel #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));
        }
Beispiel #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));
 }