[metapost] MP docs
Hans Hagen
pragma at wxs.nl
Sun May 20 22:45:52 CEST 2007
Taco Hoekwater wrote:
> Hans Hagen wrote:
>> Taco Hoekwater wrote:
>>> Hans Hagen wrote:
>>>>>
>>>>> The user-friendly solution were to have 'black' and 'white' behave
>>>>> as an
>>>>> rgbcolor /or/ cmykcolor depending on the context, but I don't know if
>>>>> that is possible in MetaPost.
>>>
>>> No, but it could be a greyscale, as Hans proposed. But I am not sure
>>> that that is a good idea. The whole point of also having greyscale
>>> and CMYK color models is to have more control over color conversions.
>> gray conversion?
>>
>> a rip translates the 4th component to a b/w plate anyway and does the
>> same with a gray scale
>>> grey levels are bare numerics, yes. It seemed silly and
>>> over-complicated
>>> to introduce a <type> for a <single value>.
>>>
>> hm, but withcolor <numeric> does not work so one cannot use
>> greyscales as one used rgb/cmyk which is inconsistent and more silly
>
> But that does work.
>
> beginfig(1);
> fill unitsquare scaled 100 withcolor .5;
> endfig;
> end
>
> is fine. I assume you have it confused with something else.
hm, maybe a typo in my test file; so we will have:
let graycolor = numeric ;
let greycolor = numeric ;
rgbcolor red ; red := (1,0,0) ;
rgbcolor green ; green := (0,1,0) ;
rgbcolor blue ; blue := (0,0,1) ;
rgbcolor rgbblack ; rgbblack := (0,0,0) ;
rgbcolor rgbwhite ; rgbwhite := (1,1,1) ;
cmykcolor cyan ; cyan := (1,0,0,0) ;
cmykcolor magenta ; magenta := (0,1,0,0) ;
cmykcolor yellow ; yellow := (0,0,1,0) ;
cmykcolor cmykblack ; cmykblack := (0,0,0,1) ;
cmykcolor cmykwhite ; cmykwhite := (0,0,0,0) ;
graycolor black ; black := 0 ;
graycolor white ; white := 1 ;
fill fullcircle scaled 10cm withcolor cyan ;
fill fullcircle scaled 7cm withcolor red ;
fill fullcircle scaled 4cm withcolor white ;
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the metapost
mailing list