public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var key = operandStack.Pop(); operandStack.Push(new DictionaryOperand()); }
public override void Execute(EpsInterpreter interpreter) { var operand = interpreter.OperandStack.Pop(); GraphicsState graphicState = interpreter.GraphicState; graphicState.ColorSpace = ColorSpaceActivator.CreateColorSpace(interpreter, operand); }
/// <summary> /// Register the resource commands /// </summary> static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("defineresource", new DefineResourceOperand()); interpreter.RegisterCommand("findresource", new FindResourceOperand()); interpreter.RegisterCommand("undefineresource", new UndefineResourceOperand()); interpreter.RegisterCommand("resourceforall", new ResourceForAllOperand()); interpreter.RegisterCommand("resourcestatus", new ResourceStatusOperand()); }
/// <summary> /// Register painting commands /// </summary> static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("eofill", new EoFillOperand()); interpreter.RegisterCommand("fill", new FillOperand()); interpreter.RegisterCommand("image", new PaintNotingCmd()); interpreter.RegisterCommand("imagemask", new PaintNotingCmd()); interpreter.RegisterCommand("stroke", new StrokeCmd()); }
/// <summary> /// Register the string command /// </summary> static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("status", new StatusCmd()); interpreter.RegisterCommand("string", new StringCmd()); interpreter.RegisterCommand("search", new SearchCmd()); interpreter.RegisterCommand("anchorsearch", new AnchorSearchCmd()); interpreter.RegisterCommand("token", new TokenCmd()); }
static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("currentfile", new CurrentFileCmd()); interpreter.RegisterCommand("filter", new FilterCmd()); interpreter.RegisterCommand("flushfile", new FlushFileCmd()); interpreter.RegisterCommand("readstring", new ReadStringCmd()); interpreter.RegisterCommand("readline", new ReadLineCmd()); }
/// <summary> /// Bind the operand /// </summary> public override void Bind(EpsInterpreter interpreter) { var name = new NameOperand { Value = this.Name }; BoundOperand = DictionaryStackHelper.FindValue(interpreter.DictionaryStack, name); }
public override void Execute(EpsInterpreter interpreter) { var lineCap = interpreter.OperandStack.PopInteger(); GraphicsState graphicState = interpreter.GraphicState; graphicState.LineCap = GetLineCap(lineCap.Value); }
public override void Execute(EpsInterpreter interpreter) { GraphicsState graphicState = interpreter.GraphicState; var colorComponents = graphicState.FillBrush.GetRGBColorOperands(); interpreter.OperandStack.PushFromList(colorComponents); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; operandStack.Push(new NullOperand()); operandStack.Push(new NullOperand()); operandStack.Push(new NullOperand()); }
public override void Execute(EpsInterpreter interpreter) { var miterLimit = interpreter.OperandStack.PopRealValue(); GraphicsState graphicState = interpreter.GraphicState; graphicState.MiterLimit = miterLimit; }
public override void Execute(EpsInterpreter interpreter) { var file = new FileOperand { Reader = interpreter.FileReader }; interpreter.OperandStack.Push(file); }
public override void Execute(EpsInterpreter interpreter) { var lineWidth = interpreter.OperandStack.PopRealValue(); GraphicsState graphicState = interpreter.GraphicState; graphicState.LineWidth = lineWidth; }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var array = operandStack.Pop(); operandStack.Push(array); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var topOperand = operandStack.Pop(); var graphicState = interpreter.GraphicState; var ctm = graphicState.CurrentTransformationMatrix; var geometry = new GraphicPathGeometry(); switch (topOperand) { case IntegerOperand integerOperand: case RealOperand realOperand: { var height = OperandHelper.GetRealValue(topOperand); var width = operandStack.PopRealValue(); var y = operandStack.PopRealValue(); var x = operandStack.PopRealValue(); AddRectangle(geometry, x, y, width, height, ctm); break; } case ArrayOperand arrayOperand: { for (int i = 0; i < arrayOperand.Values.Count; i += 4) { var x = OperandHelper.GetRealValue(arrayOperand.Values[i].Operand); var y = OperandHelper.GetRealValue(arrayOperand.Values[i + 1].Operand); var height = OperandHelper.GetRealValue(arrayOperand.Values[i + 2].Operand); var width = OperandHelper.GetRealValue(arrayOperand.Values[i + 3].Operand); AddRectangle(geometry, x, y, width, height, ctm); } break; } case StringOperand stringOperand: { var values = HomogeneousNumberArrayDecoder.Decode(stringOperand); for (int i = 0; i < values.Count; i += 4) { var x = values[i]; var y = values[i + 1]; var height = values[i + 2]; var width = values[i + 3]; AddRectangle(geometry, x, y, width, height, ctm); } break; } } ClipHelper.SetClip(interpreter, geometry); interpreter.ResetCurrentGeometry(); }
/// <summary> /// Register array commands /// </summary> static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("aload", new ALoadCmd()); interpreter.RegisterCommand("array", new ArrayCmd()); interpreter.RegisterCommand("astore", new AStoreCmd()); interpreter.RegisterCommand("currentpacking", new CurrentPackingCmd()); interpreter.RegisterCommand("packedarray", new ArrayCmd()); interpreter.RegisterCommand("setpacking", new SetPackingCmd()); }
public override void Execute(EpsInterpreter interpreter) { if (!interpreter.IsInStoppedContext) { interpreter.QuitExecution(); } interpreter.StopProcedure(); }
/// <summary> /// Register commands that work on more than one type /// </summary> static public void Register(EpsInterpreter interpreter) { interpreter.RegisterCommand("copy", new CopyCmd()); interpreter.RegisterCommand("get", new GetCmd()); interpreter.RegisterCommand("getinterval", new GetIntervalCmd()); interpreter.RegisterCommand("length", new LengthCmd()); interpreter.RegisterCommand("put", new PutCmd()); interpreter.RegisterCommand("putinterval", new PutIntervalCmd()); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; operandStack.Pop(); operandStack.Pop(); operandStack.Pop(); operandStack.Pop(); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var operand = operandStack.Pop(); var boolOp = new BooleanOperand(false); operandStack.Push(boolOp); }
public override void Execute(EpsInterpreter interpreter) { var name = new NameOperand { Value = this.Name }; var op = DictionaryStackHelper.FindValue(interpreter.DictionaryStack, name); interpreter.OperandStack.Push(op); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var offset = operandStack.PopRealValue(); var array = operandStack.PopArray(); SetDashPattern(interpreter.GraphicState, offset, array); }
public override void Execute(EpsInterpreter interpreter) { var op = interpreter.ErrorDict.TryFind("handleerror"); if (op != null) { interpreter.Execute(op); } }
public override void Execute(EpsInterpreter interpreter) { GraphicsState graphicState = interpreter.GraphicState; graphicState.ColorSpace = ColorSpaceActivator.CreateColorSpace(interpreter, EpsKeys.DeviceCMYK); graphicState.FillBrush = graphicState.ColorSpace.GetBrushDescriptor(interpreter.OperandStack.PopToList(graphicState.ColorSpace.GetNumberOfValuesPerColor()), graphicState.CurrentTransformationMatrix); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var key = operandStack.Pop(); var dict = (DictionaryOperand)operandStack.Pop(); dict.Dictionary.Remove(key); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var res = new RealOperand(); res.Value = RandomHelper.Rrand(); operandStack.Push(res); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var category = operandStack.PopStringValue(); var key = operandStack.Pop(); interpreter.ResourceManager.UndefineResource(category, key); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var count = new IntegerOperand { Value = operandStack.Count }; operandStack.Push(count); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var operand = operandStack.Pop(); var b = new BooleanOperand(operand.IsExecutable); operandStack.Push(b); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var operand2 = operandStack.Pop(); var operand1 = operandStack.Pop(); operandStack.Push(operand2); operandStack.Push(operand1); }