Re: GDI+ (SetROP2_I???)



You cannot do this with GDI+. A "feature" that I remember arguing
voiceferously about many years ago with poor John Hornick ;-).

The only way to go is to interop the the GDI calls and draw using GDI calls
for all drawing operations that you want to be drawn with an XOR brush.

There is a cheat if you just want to draw lines because ControlPaint
provides a set of DrawReversibleXXX methods but they do the interop for you
under the covers anyway.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Gilberto Müller" <GilbertoMller@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:03059AE5-33DA-43B2-9F75-D4D361F4DEE5@xxxxxxxxxxxxxxxx
> Hi again,
>
> How to configure the pen mode using GDI+ ?
> Example: R2_XORPEN
>
> Thanks,


.



Relevant Pages

  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: GDI+ Performance Question
    ... I've been reading alot about how GDI+ does not ... > the scrolling. ... > render on the screen, though most likely, I'll only need to render at most ... I either use another .NET control and draw to that ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Create bitmap from pBuffer
    ... Interop to GDI using StretchBlt or BitBlt will definitely be faster. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... to draw on top of the resulting bitmap. ...
    (microsoft.public.dotnet.framework.drawing)
  • GDI+ Performance Question
    ... I've been reading alot about how GDI+ does not ... the scrolling. ... When I scroll up or down, it consumes 100% of my CPU to draw ... render on the screen, though most likely, I'll only need to render at most ...
    (microsoft.public.dotnet.framework.drawing)