org.jpedal.parser.text.TR 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
/*
* ===========================================
* 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@
*
* ---------------
* TR.java
* ---------------
*/
package org.jpedal.parser.text;
import org.jpedal.objects.GraphicsState;
public class TR {
public static int execute(final int key, final GraphicsState gs) {
int value = key;
//Text render mode
switch (key) {
case 0:
value = GraphicsState.FILL;
break;
case 1:
value = GraphicsState.STROKE;
break;
case 2:
value = GraphicsState.FILLSTROKE;
break;
case 3:
value = GraphicsState.INVISIBLE;
//allow user to over-ride
if (Tj.showInvisibleText) {
value = GraphicsState.FILL;
}
break;
case 7:
value = GraphicsState.CLIPTEXT;
break;
}
gs.setTextRenderType(value);
return value;
}
}