/// <summary> /// init /// </summary> public void Init(EpsInterpreter interpreter, DictionaryOperand patternDict) { var shadingDict = patternDict.Dictionary.GetDictionary(EpsKeys.Shading); shading = ShadingActivator.CreateShading(interpreter, shadingDict); var matrixArray = patternDict.Dictionary.GetArray(EpsKeys.Matrix); matrix = OperandHelper.GetMatrix(matrixArray); }
public override void Execute(EpsInterpreter interpreter) { var shadingDict = interpreter.OperandStack.PopDictionary(); GraphicsState graphicState = interpreter.GraphicState; var graphicPath = new GraphicPath(); var shadingDescriptor = ShadingActivator.CreateShading(interpreter, shadingDict); graphicPath.Geometry = graphicState.ClippingPath; graphicPath.FillBrush = shadingDescriptor.GetBrush(graphicState.CurrentTransformationMatrix, graphicState.ClippingPath.Bounds); graphicPath.ColorPrecision = shadingDescriptor.ColorPrecision; interpreter.GraphicGroup.Childreen.Add(graphicPath); }