All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jpedal.parser.text.EMC Maven / Gradle / Ivy

There is a newer version: 7.15.25
Show newest version
/*
 * ===========================================
 * Java Pdf Extraction Decoding Access Library
 * ===========================================
 *
 * Project Info:  http://www.idrsolutions.com
 * Help section for developers at http://www.idrsolutions.com/support/
 *
 * (C) Copyright 1997-2017 IDRsolutions and Contributors.
 *
 * This file is part of JPedal/JPDF2HTML5
 *
 @LICENSE@
 *
 * ---------------
 * EMC.java
 * ---------------
 */
package org.jpedal.parser.text;

import org.jpedal.objects.GraphicsState;
import org.jpedal.parser.ParserOptions;
import org.jpedal.render.DynamicVectorRenderer;

public class EMC {

    public static void execute(final DynamicVectorRenderer current, final GraphicsState gs, final ParserOptions parserOptions) {

        //remove any clip
        if (parserOptions.layerClips.contains(parserOptions.getLayerLevel())) {
            gs.setClippingShape(null);
            current.drawClip(gs, null, true);
        }

        parserOptions.getLayerVisibility().remove(parserOptions.getLayerLevel());
        parserOptions.setLayerLevel(parserOptions.getLayerLevel() - 1);

        //reset flag
        final boolean flag = (parserOptions.layers == null || parserOptions.getLayerLevel() == 0 || parserOptions.getLayerVisibility().contains(parserOptions.getLayerLevel()));

        parserOptions.setIsLayerVisible(flag);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy