Examples of PDShadingResources


Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

        {
            context.addValidationError(new ValidationError(PreflightConstants.ERROR_GRAPHIC_MISSING_OBJECT, "ShadingPattern validation required at least a PDResources"));
        }
        else
        {
            PDShadingResources shaddingResource = (PDShadingResources) vPath.peek();
            PDPage page = vPath.getClosestPathElement(PDPage.class);
            checkColorSpace(context, page, shaddingResource);
            checkGraphicState(context, page, shaddingResource);
        }
    }
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     *
     * @throws IOException If there is an IO error while shade-filling the clipping area.
     */
    public void shFill(COSName shadingName) throws IOException
    {
        PDShadingResources shading = getResources().getShadings().get(shadingName.getName());
        LOG.debug("Shading = " + shading.toString());
        int shadingType = shading.getShadingType();
        Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
        Paint paint = null;
        switch (shadingType)
        {
            case 1:
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

            Iterator<String> iter = shadingsValue.keySet().iterator();
            COSDictionary dic = new COSDictionary();
            while (iter.hasNext())
            {
                String name = iter.next();
                PDShadingResources shading = shadingsValue.get(name);
                dic.setItem(COSName.getPDFName(name), shading.getCOSObject());
            }
            resources.setItem(COSName.SHADING, dic);
        }
        else
        {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     *
     * @throws IOException If there is an IO error while shade-filling the clipping area.
     */
    public void shFill(COSName shadingName) throws IOException
    {
        PDShadingResources shading = getResources().getShadings().get(shadingName.getName());
        LOG.debug("Shading = " + shading.toString());
        int shadingType = shading.getShadingType();
        Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
        Paint paint = null;
        switch (shadingType)
        {
            case 1:
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     * {@inheritDoc}
     */
    public Paint getPaint(int pageHeight) throws IOException
    {
        Paint paint = null;
        PDShadingResources shadingResources = getShading();
        int shadingType = shadingResources != null ? shadingResources.getShadingType() : 0;
        switch (shadingType)
        {
            case PDShadingResources.SHADING_TYPE1:
                paint = new Type1ShadingPaint((PDShadingType1)getShading(), getMatrix(), pageHeight);
                break;
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

        Iterator<String> iter = shadingsValue.keySet().iterator();
        COSDictionary dic = new COSDictionary();
        while( iter.hasNext() )
        {
            String name = iter.next();
            PDShadingResources shading = shadingsValue.get( name );
            dic.setItem( COSName.getPDFName( name ), shading.getCOSObject() );
        }
        resources.setItem( COSName.SHADING, dic );
    }
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     *
     * @throws IOException If there is an IO error while shade-filling the clipping area.
     */
    public void shFill(COSName shadingName) throws IOException
    {
        PDShadingResources shading = getResources().getShadings().get(shadingName.getName());
        LOG.debug("Shading = " + shading.toString());
        int shadingType = shading.getShadingType();
        Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
        Paint paint = null;
        switch (shadingType)
        {
            case 1:
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     * {@inheritDoc}
     */
    public Paint getPaint(int pageHeight) throws IOException
    {
        Paint paint = null;
        PDShadingResources shadingResources = getShading();
        int shadingType = shadingResources != null ? shadingResources.getShadingType() : 0;
        switch (shadingType)
        {
            case PDShadingResources.SHADING_TYPE2:
                paint = new AxialShadingPaint((PDShadingType2)getShading(), null, pageHeight);
                break;
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     *
     * @throws IOException If there is an IO error while shade-filling the clipping area.
     */
    public void shFill(COSName shadingName) throws IOException
    {
        PDShadingResources shading = getResources().getShadings().get(shadingName.getName());
        LOG.debug("Shading = " + shading.toString());
        int shadingType = shading.getShadingType();
        Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
        Paint paint = null;
        switch (shadingType)
        {
            case 1:
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources

     * {@inheritDoc}
     */
    public Paint getPaint(int pageHeight) throws IOException
    {
        Paint paint = null;
        PDShadingResources shadingResources = getShading();
        int shadingType = shadingResources != null ? shadingResources.getShadingType() : 0;
        switch (shadingType)
        {
            case PDShadingResources.SHADING_TYPE1:
                paint = new Type1ShadingPaint((PDShadingType1)getShading(), getMatrix(), pageHeight);
                break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.