Skip to main content
Participant
Feb 18, 2009 7:13 AM UTC
Question

Editing Postscript file

Hi,

I have an EPS file with a single Polygon object in it, i want to change the fill color of that object. Not in any designer, but programmatically (Microsoft .NET), because i will then use the resulted EPS somewhere else.

I tried a component, but it resulted in a raster EPS, that ofcourse, i dont want.

Does anyone know how do i do it?

Thanks
This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Participating Frequently
Mar 9, 2009 4:51 PM UTC
Do you want to hard code the fill color of the polygon, or do you want the ability to change it dynamically later on via a .NET component?

of course the postScript for setting a color is

C M Y K setcmykcolor

or

R G B setrgbcolor

where each letter parameter is a percentage value of 1 (read .5 for 50%) for its corresponding color. Depends if you like RGB or CMYK color.

so in the postScript code, you could insert or change the color and fill to something like

1 0 0 0 setcmykcolor
fill

which would set the color to blue, then fill the current path.

I am not sure if this is what you are looking for or not.
Translate