Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-09
1
Medium Priority
?
1,048 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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