copy from A Graphics to another Graphice ?

  • Thread starter Thread starter perspolis
  • Start date Start date
P

perspolis

Hi all
is it possible in C# to copy content of a graphics object to another like
BitBlt API??

thanks
 
I don't think that will help. DrawImage draws images over the graphics
objects. Even though the Bitmap class has a constructor that accepts
Graphics object as a parameter it uses it only to initialize certain
properties, but it doesn't copy the pixels.

If it goes for Graphcis objects created for controls I don't think in .NET
1.x there is managed solution to the problem. .NET 2.0 introduces
Graphics.CopyFromScreen that can be used in some cases to accomplish this.

If the graphcis object is for an image then use the image instead and copy
the image over the new graphics.
 
I think you may have to use Graphics.GetHdc() to call BitBlt() yourself
then, as I can't find the .NET way to do this too...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top