Package org.jpedal.color

Examples of org.jpedal.color.PdfColor


                    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:
View Full Code Here


        colorsLocked=true;
        Color strokeColor=Color.white,nonstrokeColor=Color.white;

        if(!strokePaint.isPattern())
            strokeColor=(Color) strokePaint;
        strokeCol=new PdfColor(strokeColor.getRed(),strokeColor.getGreen(),strokeColor.getBlue());

        if(!nonstrokePaint.isPattern())
            nonstrokeColor=(Color) nonstrokePaint;
        fillCol=new PdfColor (nonstrokeColor.getRed(),nonstrokeColor.getGreen(),nonstrokeColor.getBlue());

    }
View Full Code Here

TOP

Related Classes of org.jpedal.color.PdfColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.