4u2ges
asked on
GDI+ Antialiasing a region or fully subtract one path from another
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
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
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.