Solved

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

Posted on 2008-06-09
1
1,044 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

615 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