SetRop2 with GDI+

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

From what I can tell there is no equivalent in GDI+ to the SetRop2 API. Is
this correct or have I missed something?

I'm able to use GDI in some cases but not all. My rendering code only has
access to a Graphics object and if this Graphics comes from a control or
printer all goes well. If the Graphics object comes from a
System.Drawing.Image, GDI does not work.

Has anyone else come across this problem and possibly found a workaround?

Thanks.
 
From what I can tell there is no equivalent in GDI+ to the SetRop2 API.
Is
this correct or have I missed something?
It is correct. What you draw in GDI+ is independant of the surface you draw
onto.
I'm able to use GDI in some cases but not all. My rendering code only has
access to a Graphics object and if this Graphics comes from a control or
printer all goes well. If the Graphics object comes from a
System.Drawing.Image, GDI does not work.
I had some problem with Image's graphic. ScriptTextOut was looking awful.
What's your problem?
Has anyone else come across this problem and possibly found a workaround?
For my particular problem I used... aheum.. BufferedGraphics to draw on a
bitmap.
A bit .. kind of weird, but solved my rendering issue (text horribly
aliased).
 
Lloyd Dupont said:
I had some problem with Image's graphic. ScriptTextOut was looking awful.
What's your problem?

I'm using the R2_MASKPEN rop with various GDI drawing methods. When the
Graphics comes from an Image it results in solid black. The only solution I
could find was to modify the code to allow access to the Image object and
manipulate the pixel data directly. It's a pain but the results are good.
 
Back
Top