org.jpedal.fonts.glyph.BaseT1Glyph Maven / Gradle / Ivy
/*
* ===========================================
* 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@
*
* ---------------
* BaseT1Glyph.java
* ---------------
*/
package org.jpedal.fonts.glyph;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* defines the current shape which is created by command stream
* This class is NOT part of the API
.
* Shapes can be drawn onto pdf or used as a clip on other image/shape/text.
* Shape is built up by storing commands and then turning these commands into a
* shape. Has to be done this way as Winding rule is not necessarily
* declared at start.
*/
public abstract class BaseT1Glyph extends PdfGlyph implements Serializable {
protected float glyfwidth = 1000f;
protected boolean isStroked;
protected final Map strokedPositions = new HashMap();
public BaseT1Glyph() {
}
@Override
public void setStrokedOnly(final boolean flag) {
isStroked = flag;
}
@Override
public void setWidth(final float width) {
this.glyfwidth = width;
}
/* (non-Javadoc)
* @see org.jpedal.fonts.PdfGlyph#getmaxWidth()
*/
@Override
public float getmaxWidth() {
return glyfwidth;
}
}