Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 5
0
 public override object Clone()
 {
     Gdip.CheckStatus(Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out IntPtr clonedBrush));
     return(new PathGradientBrush(clonedBrush));
 }