Home All Groups Group Topic Archive Search About
Author
25 Oct 2006 12:27 PM
Glenn
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.

Author
26 Oct 2006 6:51 AM
Lloyd Dupont
> 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).
Author
26 Oct 2006 11:22 AM
Glenn
"Lloyd Dupont" wrote:

> > 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?

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.

AddThis Social Bookmark Button