I am a beginner for post script and just started working on post script. I want to create a post script procedure which I can use for shading effect for post script.This shading can have more then 2 colors so I need to define stitching function of type 3.
I am thinking of defining a procedure for function2 and later I can use this procedure in defining the type 3 function.
below is what I tried...
/Function2 {
/b2 exch def
/g2 exch def
/r2 exch def
/b exch def
/g exch def
/r exch def
/FunctionType 2
/Domain [ 0 1 ]
/C0 [ r g b ]
/C1 [ r2 g2 b2 ]
/N 1
} def
/Function3
{
/num exch def
/FunctionType 3
/Domain [ 0 1 ]
/Functions [1 1 num { pop Function2 } for ]
/Bounds [ 1 1 num-1 { pop } for ]
/Encode [ 1 1 num { pop 0 1 } for ]
} def
{
/ShadingType 3
/ColorSpace /DeviceRGB
/Coords [ 200 200 0 200 200 100 ]
/Extend [ true true ]
/Function Function3
}
shfill
Issue I am facing is how to read bound variables from the stack. I am not sure this will work or not. please check and let me know the issues in that.