[metapost] Problem with simulated gradient

Jesús Guillermo Andrade gandrade at usermail.com
Thu Mar 19 17:36:49 CET 2009

Dear Fellows: I´ve been working over this problem for a long time and  
so far I haven't got the desired results. I need to create a linear  
gradient (or at least simulate it) from left to right in a polygon. I  
don't want to use metafun and the problem is how to fake it in eps. I  
am in urgent need for a solution and I don´t have anyone to ask for  
help excepto for this list. Could anybody help me please?
This is code I have so far:

% A&M Logo
% Por Guillermo Andrade
% -------------------------------
% Preparacion
filenametemplate "%j-%3c.eps";
fontmapfile "pdftex_dl14.map";
input mp-tool;
input mp-spec ;

% Variables
color c[];
% Funciones

% Dibujos
   path eme; % this is the polygon I need filled with a simulated  
gradient from one color to another (horizontally).
   eme = (-2.4u,6.2u)--(-4.5u,6.2u)--(-5.9u,0u)--(-4.15u,5.28u)-- 
%%% Relleno
   s := .1;
   alt:= 6.2u;
   lateral:= -6u;
for i=0 step s until 200:
   fill eme shifted (-6u+i,0) withcmykcolor (i/100)[(1,0.60,.60,0), 

Thanks a lot for you help.!!!

Los errores indetectables son infinitos en su variedad, en cambio los  
detectables por definición son limitados. Tercera Ley de fiabilidad de  
Jesús Guillermo Andrade (Abg.)
Gerente de Litigios y Corporativo. EDM. AC. API.
Andrade & Moreno S.C. (http://amlegal.wordpress.com/)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/metapost/attachments/20090319/847b78d9/attachment.html 

More information about the metapost mailing list