Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

SetRop2 with GDI+

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Glenn - 25 Oct 2006 13:27 GMT
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.
Lloyd Dupont - 26 Oct 2006 07:51 GMT
> 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).
Glenn - 26 Oct 2006 12:22 GMT
> > 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
[quoted text clipped - 3 lines]
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.