Skip to main content
Participant
February 18, 2009
Question

Editing Postscript file

  • February 18, 2009
  • 1 reply
  • 883 views
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 has been closed for replies.

1 reply

Participating Frequently
March 9, 2009
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.