metapost fill between outlines
Hi Is it possible to fill out a space between two outlines? As for an example, I'd like to draw two circles (same center, one bigger than the other) and fill out the difference. Something like the letter "O". Here's a concrete example: %%% draw (6.949220,13.046900)..controls (9.539060,13.046900) and (10.023400,10.781200)..(10.023400,8.679690) ..controls (10.023400,5.335940) and (6.949220,0.000000)..(3.234380,0.000000) ..controls (0.890625,0.000000) and (0.000000,1.886720)..(0.000000,3.828120) ..controls (0.000000,8.492190) and (3.316410,13.046900)..(6.949220,13.046900) --cycle; draw (7.488280,12.293000)..controls (4.933590,12.293000) and (1.265620,6.226560)..(1.265620,2.531250) ..controls (1.265620,1.562500) and (1.695310,0.835938)..(2.722660,0.835938) ..controls (5.230470,0.835938) and (8.972660,7.035160)..(8.972660,10.296900) ..controls (8.972660,11.269500) and (8.703120,12.293000)..(7.488280,12.293000) --cycle; %%% I want to fill out the space between these two draw lines. Is this actually possible? The only reference to this I found was on wikipedia: "Most notably, paths can have only one segment (so that regions are simply connected), (...)" (http://en.wikipedia.org/wiki/MetaPost). I thought I ask here before I put this aside. As a workaround I fill out the bigger one with color black and the smaller one with color white, but I need to put this on different background colors, so the use of this is very limited. How does it work with fonts (Metafont)? Who's filling that out, because thats also just based on outlines, right? Thanks Adam
On 02/20/2011 04:25 PM, Reviczky, Adam wrote:
As a workaround I fill out the bigger one with color black and the smaller one with color white, but I need to put this on different background colors, so the use of this is very limited. You can fill out the bigger one, than clips the smaller one. And alternately, you can construct the path of the difference out of the two circles, and fill the constructed path.
participants (2)
-
Hongwen Qiu
-
Reviczky, Adam