Solved

GDI+ Antialiasing a region or fully subtract one path from another

Posted on 2008-06-09
1
1,020 Views
Last Modified: 2013-12-17
Is there any nice, clean way to antialias a region? I do not mind doing it "unsafe".

Here is what I have: a small transparent bitmap with a single (filled with one or 2 colors brush) shape. Shape is resulted from region>path intersection.

I tried to use 2 graphics paths alone (automatically solves antialiasing problem). But because resulted shape must be a Photoshop "subtract path" equivalent, I was unable to find any solution to fully subtract one path from another.

So I'm thinking going with a region, then getting pixels from memory, finding shape edges.. but that is as far as I went. If anyone can point me to the right direction as to what to do next, possibly has algorithm for the alpha at edges, or has more elegant solution to the problem.

Thanks.

shapes.png
0
Comment
Question by:4u2ges
1 Comment
 
LVL 1

Accepted Solution

by:
4u2ges earned 0 total points
ID: 21798880
Settled for a compromise with path subtraction (Photoshop subtract path simulation). On fully opaque background, fill path2 with texture brush from current bitmap created before path1 is filled. If any transformation were applied to bitmap graphics before texture brush is created, then brush has to have reversed transformation applied.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now