*/
int count=type.length;
int currentType;
GraphicsState gs;
for(int i=0;i<count;i++){
currentType=type[i];
switch(currentType){
case DynamicVectorRenderer.FILLOPACITY:
setGraphicsState(GraphicsState.FILL, ((Float)obj[i]).floatValue());
break;
case DynamicVectorRenderer.STROKEOPACITY:
setGraphicsState(GraphicsState.STROKE, ((Float)obj[i]).floatValue());
break;
case DynamicVectorRenderer.STROKEDSHAPE:
gs=new GraphicsState();
gs.setFillType(GraphicsState.STROKE);
gs.setStrokeColor(new PdfColor(colors[i].getRed(),colors[i].getGreen(),colors[i].getBlue()));
drawShape( (Shape)obj[i],gs, Cmd.S);
break;
case DynamicVectorRenderer.FILLEDSHAPE:
gs=new GraphicsState();
gs.setFillType(GraphicsState.FILL);
gs.setNonstrokeColor(new PdfColor(colors[i].getRed(),colors[i].getGreen(),colors[i].getBlue()));
drawShape( (Shape)obj[i],gs, Cmd.F);
break;
case DynamicVectorRenderer.CUSTOM:
drawCustom(obj[i]);
break;
case DynamicVectorRenderer.IMAGE:
ImageObject imgObj=(ImageObject)obj[i];
gs=new GraphicsState();
gs.CTM=new float[][]{ {imgObj.image.getWidth(),0,1}, {0,imgObj.image.getHeight(),1}, {0,0,0}};
gs.x=imgObj.x;
gs.y=imgObj.y;
drawImage(this.pageNumber,imgObj.image, gs,false,"extImg"+i, PDFImageProcessing.NOTHING, -1);
break;
case DynamicVectorRenderer.STRING:
TextObject textObj=(TextObject)obj[i];
gs=new GraphicsState();
float fontSize=textObj.font.getSize();
double[] afValues={fontSize,0f,0f,fontSize,0f,0f};
drawAffine(afValues);
drawTR(GraphicsState.FILL);
gs.setTextRenderType(GraphicsState.FILL);
gs.setNonstrokeColor(new PdfColor(colors[i].getRed(),colors[i].getGreen(),colors[i].getBlue()));
drawText(null,textObj.text,gs,textObj.x,-textObj.y,textObj.font); //note y is negative
break;
case 0: