[NTG-context] shading in meta[post/play] & PDF

Mojca Miklavec mojca.miklavec at guest.arnes.si
Sat Jan 22 02:36:44 CET 2005

>> Page 746 of PDF Reference, version 1.6 also defines an interesting new 
>> feature: 3D objects (3D Artwork as they call it), but I haven't found 
>> anything else about that.
> there is a section about shading, the function numbers differ;

How? (I was talking only about shading types, not about function types 
at all anyway, but the number *should* be the same.)

> take a look at supp-mpe.tex, all we need is some variant on
> \defineMPspecial{31}
>   {\startMPshading{16}% type 3
>    \setMPshadingcolors{4}{5}{6}{10}{11}{12}%
>    \immediate\pdfobj
>      {<</FunctionType 2
>         /Domain [\gMPs1 \gMPs2]
>         /C0 [\MPshadeA]
>         /C1 [\MPshadeB]
>         /N \gMPs3>>}%
>    \immediate\pdfobj
>      {<</ShadingType 3
>         /ColorSpace /\MPshadeC\space
>         /Function \the\pdflastobj\space 0 R
>         /Coords [\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}]
>         /Extend [true true]>>}%
>    \stopMPshading}
> (plus some more depending on what parameters need to be passed)

Thanks for pointing it out.

This piece of code is very nice (however the whole bunch of code that 
resides in the file ... I wonder how you managed to put all that stuff 
together :)

  > if you can locate the right stuff in the pdf ref manual we can see what
> can be done (off list); i can add more 'special' handlers to the mp to 
> pdf converted

Here are some more examples:


(I didn't want to send the material to the list and I didn't find the 
links until now.)

I'll try to make the drawings I need (in PostScript for the beginning) 
and collect the ideas of how the things have to be implemented (which 
features supported and how). I'm in no way such a 'superwoman' to be 
able to do dozens of things efficiently in one day as you do, but I'll 
do my best; exams are approaching, so it may take me slightly longer - 
please apologize me.

Thanks again for being prepared to help. I'll write back as soon as I 
have something to report.


More information about the ntg-context mailing list