Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
Fine, I made it in a very weird way. I constructed a very strange path to go through the outer path in counter- clockwise direction and inner path in clockwise dir- ection and filled it. I don't feel good but it can be done now. On Wed, Jun 24, 2009 at 11:13 AM, Zhichu Chenzhichu.c...@gmail.com

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Taco Hoekwater
Zhichu Chen wrote: Fine, I made it in a very weird way. I constructed a very strange path to go through the outer path in counter- clockwise direction and inner path in clockwise dir- ection and filled it. I don't feel good but it can be done now. Currently, that is how it should be done.

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
Cool, but just curiosity, metapost can handle fonts right? How those glyphs don't have this problem? I've read the specification of the type1 fonts, they don't seem to have such weird paths, just some borderlines with different directions. On Wed, Jun 24, 2009 at 3:32 PM, Taco

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Wolfgang Schuster
Am 24.06.2009 um 05:13 schrieb Zhichu Chen: Hi, I got a problem in metapost. If I want to draw a ring, and use the code: fill fullcircle scaled 2cm ; unfill fullcircle scaled 1cm ; The inner part is not transparent, it has the color of background variable which is white by default. This case

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Taco Hoekwater
Zhichu Chen wrote: Cool, but just curiosity, metapost can handle fonts right? How those glyphs don't have this problem? I've read the specification of the type1 fonts, they don't seem to have such weird paths, just some borderlines with different directions. PostScript paths are more

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
I assume there's no -- between reverse and fullcircle scaled 1cm :) Well, my example is too simple. Actually, I was trying to draw a treble clef, and when there're too many intersection points (caused by the -- operator to join every path together) the output is not so good, kind of like an

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
I guess I should use as few variables as possible, I suppose no one would name their paths Helper ;) This macro assumes the argument is clockwise, I've written a macro to find out whether a path is clockwise or not, but it took me forever to run the code. Maybe there's already some primitive

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Hans Hagen
Zhichu Chen wrote: I guess I should use as few variables as possible, I suppose no one would name their paths Helper ;) Helper sounds ok, but ... pair Oringin ; Oringin := center p ; ... Oringin kind of funny Helper1 := llcorner currentpicture -- lrcorner currentpicture ; shorter:

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
On Wed, Jun 24, 2009 at 7:29 PM, Hans Hagenpra...@wxs.nl wrote: Zhichu Chen wrote: I guess I should use as few variables as possible, I suppose no one would name their paths Helper ;) Helper sounds ok, but ...  pair Oringin ; Oringin := center p ; ... Oringin kind of funny I'll change

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Nicola
In article 769ba7780906240342s4939ac2foe7bfd783ad2e8...@mail.gmail.com, Zhichu Chen zhichu.c...@gmail.com wrote: Well, my example is too simple. Actually, I was trying to draw a treble clef If your goal is to draw a path with pens of varying width (kind of calligraphic strokes),'penpos'

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
Hi Nicola, Thank you very much for your example and the idea. It's amazing, I thought it's just a metafont thing and metapost just can't do that. Thank you for your information again. On Wed, Jun 24, 2009 at 10:12 PM, Nicolanvitacolo...@gmail.com wrote: In article

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Lutz Haseloff
Hi Zichu, an other approach (mkiv + lilypond font): \definefont[music][name:emmentaler20 at 72pt] \starttext \music\char57770 \stoptext :-) Greetings Lutz 2009/6/24 Zhichu Chen zhichu.c...@gmail.com Hi Nicola, Thank you very much for your example and the idea. It's amazing, I thought