org.jpedal.parser.text.EMC Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenViewerFX Show documentation
Show all versions of OpenViewerFX Show documentation
Open Source (LGPL) JavaFX PDF Viewer for NetBeans plugin
The 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);
}
}