Re: gdi+ bitmap copy constructor
From: Michael Phillips, Jr. (m_phillips53_at_nospam.hotmail.com.invalid)
Date: 07/07/04
- Next message: Jim Hubbard: "Re: GDI questions..."
- Previous message: Adam Versteegen: "Re: gdi+ bitmap copy constructor"
- In reply to: Adam Versteegen: "Re: gdi+ bitmap copy constructor"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Jul 2004 19:53:31 -0400
The clone method makes a copy of the bitmap.
The pointer to the cloned copy is not an alias to the original bitmap's
memory.
You can also copy a Bitmap by creating a new Bitmap with the same
characteristics as the original
and obtaining a Graphics object that will allow you to BitBlt the original
Bitmap to the copy.
It is easier to use the Clone method.
I hope this helps!
"Adam Versteegen" <no@email.com> wrote in message
news:8_OdnROznps2FHHdRVn-uw@comcast.com...
> Michael Phillips, Jr. wrote:
>
>> Hi,
>>
>> You can create a copy by using the Clone method which is inherited from
> the
>> Image Class.
>>
>> // Make a copy of NewSign's Bitmap
>> Bitmap *SignImg = NewSign.Clone();
>
> I read somewhere that that doesn't actually give me a new seperate Bitmap
> object though. I thought that internally it was still pointing to the same
> Image object and that any changes to the copy would happen to the
> original.
>
> Is that not the case? If not then clone is exactly what I need. If so, its
> no good...
>
> --
> Vesty.
>
>
- Next message: Jim Hubbard: "Re: GDI questions..."
- Previous message: Adam Versteegen: "Re: gdi+ bitmap copy constructor"
- In reply to: Adam Versteegen: "Re: gdi+ bitmap copy constructor"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|