Uses of Class
org.ofdrw.layout.element.canvas.DrawContext
Packages that use DrawContext
-
Uses of DrawContext in org.ofdrw.layout.edit
Methods in org.ofdrw.layout.edit with parameters of type DrawContext -
Uses of DrawContext in org.ofdrw.layout.element.canvas
Methods in org.ofdrw.layout.element.canvas that return DrawContextModifier and TypeMethodDescription添加字体至文档资源中DrawContext.arc(double a, double b, double angle, boolean large, boolean sweep, double x, double y) 从当前点连接到点(x,y)的圆弧,并将当前点移动到点(x,y)。 rx 表示椭圆的长轴长度,ry 表示椭圆的短轴长度。angle 表示 椭圆在当前坐标系下旋转的角度,正值为顺时针,负值为逆时针, large 为 1 时表示对应度数大于180°的弧,为 0 时表示对应 度数小于 180°的弧。sweep 为 1 时表示由圆弧起始点到结束点 是顺时针旋转,为 0 时表示由圆弧起始点到结束点是逆时针旋转。DrawContext.arc(double x, double y, double r, double sAngle, double eAngle) 创建弧/曲线(用于创建圆或部分圆)DrawContext.arc(double x, double y, double r, double sAngle, double eAngle, boolean counterclockwise) 创建弧/曲线(用于创建圆或部分圆)DrawContext.beginPath()开启一段新的路径DrawContext.bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) 方法三次贝塞尔曲线的指定控制点,向当前路径添加一个点。DrawContext.clip()从原始画布中剪切任意形状和尺寸DrawContext.closePath()关闭路径在OFD上绘制图像在OFD上绘制图像DrawContext.drawImage(Path img, double sx, double sy, double sWidth, double sHeight, double dx, double dy, double dWidth, double dHeight) 裁剪图片并在OFD上绘制图像DrawContext.fill()填充已定义路径DrawContext.fillRect(double x, double y, double width, double height) 创建并填充矩形路径填充文字DrawContext.lineTo(double x, double y) 从当前点连线到指定点DrawContext.moveTo(double x, double y) 移动绘制点到指定位置DrawContext.quadraticCurveTo(double cpx, double cpy, double x, double y) 通过二次贝塞尔曲线的指定控制点,向当前路径添加一个点。DrawContext.rect(double x, double y, double width, double height) 创建矩形路径DrawContext.restore()还原绘图状态DrawContext.rotate(double angle) 旋转当前的绘图DrawContext.save()保存当前绘图状态DrawContext.scale(double scalewidth, double scaleheight) 缩放当前绘图,更大或更小DrawContext.setDefaultFont(double fontSize) 设置默认字体DrawContext.setFillColor(int[] fillColor) 设置填充颜色DrawContext.setFillColor(int r, int g, int b) 设置填充颜色DrawContext.setFont(FontSetting font) 设置绘制文字信息DrawContext.setGlobalAlpha(Double globalAlpha) 设置 绘图透明度值DrawContext.setLineCap(org.ofdrw.core.pageDescription.drawParam.LineCapType cap) 设置端点样式DrawContext.setLineDash(Double... pattern) 设置线段虚线样式DrawContext.setLineDash(Double dashOffset, Double[] pattern) 设置线段虚线样式DrawContext.setLineJoin(org.ofdrw.core.pageDescription.drawParam.LineJoinType join) 设置线条连接样式,指定了两个线的端点结合时采用的样式。DrawContext.setLineWidth(double lineWidth) 获取当前线宽度DrawContext.setMiterLimit(Double miterLimit) 设置最大斜接长度,也就是结合点长度截断值DrawContext.setStrokeColor(int[] strokeColor) 设置描边颜色DrawContext.setStrokeColor(int r, int g, int b) 设置描边颜色DrawContext.setTextAlign(TextAlign textAlign) 设置文本对齐方式DrawContext.setTransform(double a, double b, double c, double d, double e, double f) 设置变换矩阵DrawContext.stroke()绘制已定义的路径DrawContext.strokeRect(double x, double y, double width, double height) 创建并描边矩形路径DrawContext.transform(double a, double b, double c, double d, double e, double f) 变换矩阵DrawContext.translate(double x, double y) 重新映射画布上的 (0,0) 位置Methods in org.ofdrw.layout.element.canvas with parameters of type DrawContextModifier and TypeMethodDescriptionvoidArtWord.draw(DrawContext ctx) voidCellContentDrawer.draw(DrawContext ctx) 单元格内部绘制voidDrawer.draw(DrawContext ctx) 绘制voidLine.draw(DrawContext ctx) 线条绘制器