public class Barcode extends AbstractComponent
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
| 限定符和类型 | 方法和说明 |
|---|---|
protected BufferedImage |
addImageWords(BufferedImage image)
添加图像文字
|
protected int |
cacheKey()
缓存key
|
protected BufferedImage |
createBarcodeImage()
创建条形码图像
|
protected BufferedImage |
getBarcodeImage()
获取条形码图像
|
ComponentType |
getType()
获取类型
|
protected void |
init()
初始化
|
protected void |
initErrorLevel()
初始化纠错级别
|
protected boolean |
isShowWords()
是否显示文字
|
void |
render()
渲染
|
void |
setCodeMargin(int margin)
设置条形码边距
|
void |
setEncodeHints(com.google.zxing.EncodeHintType type,
Object value)
设置编码提示
|
void |
setErrorLevel(BarcodeErrorLevel level)
设置纠错级别
|
void |
setHeight(int height)
设置高度(显示)
|
void |
setImageHeight(int height)
设置图像高度(生成)
|
void |
setImageWidth(int width)
设置图像宽度(生成)
|
void |
setQrCompact(boolean isCompact)
设置二维码紧凑模式(仅二维码有效)
|
void |
setQrMaskPattern(int pattern)
设置二维码掩码模式(仅二维码有效)
|
void |
setQrVersion(int version)
设置二维码版本(仅二维码有效)
|
void |
setWidth(int width)
设置宽度(显示)
|
protected BufferedImage |
toBufferedImage(com.google.zxing.common.BitMatrix matrix)
转图像
|
void |
virtualRender()
虚拟渲染
|
checkPaging, checkWrap, close, executeBreak, getBase, getBottom, getPage, initBase, isPaging, isPagingComponent, isWrap, paging, processBreak, reset, resetWrapWidth, resetXY, setBeginX, setBeginX, setBeginY, setBeginY, wrapinit, initFont, setCharacterSpacing, setFontSize, setLeadinginit, initBorder, setBorderColor, setBorderLineLength, setBorderLineSpacing, setBorderWidth, setIsBorderinit, initMargin, initMargin, initMarginWithParam, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTopinit, setHorizontalAlignment, setVerticalAlignmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContext, getPagingCondition, getPagingEventspublic Barcode(Page page)
page - 页面public void setWidth(int width)
width - 宽度public void setHeight(int height)
height - 高度public void setImageWidth(int width)
width - 宽度public void setImageHeight(int height)
height - 高度public void setCodeMargin(int margin)
margin - 条形码边距public void setErrorLevel(BarcodeErrorLevel level)
level - 纠错级别public void setQrVersion(int version)
version - 版本public void setQrMaskPattern(int pattern)
pattern - 掩码模式public void setQrCompact(boolean isCompact)
isCompact - 是否紧凑public void setEncodeHints(com.google.zxing.EncodeHintType type,
Object value)
type - 类型value - 值public ComponentType getType()
protected void init()
init 在类中 AbstractComponentpublic void virtualRender()
public void render()
protected void initErrorLevel()
protected boolean isShowWords()
protected BufferedImage getBarcodeImage()
protected BufferedImage createBarcodeImage()
protected BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix)
matrix - 位矩阵protected BufferedImage addImageWords(BufferedImage image)
image - 图像protected int cacheKey()
Copyright © 2024. All rights reserved.