public interface Drawable
Modifier and Type | Interface and Description |
---|---|
static class |
Drawable.DrawableHint |
Modifier and Type | Field and Description |
---|---|
static Drawable.DrawableHint |
BUFFERED_IMAGE
Stores a reference (WEAK_REFERENCE) to the buffered image, if the rendering is based on a buffered image
(如果渲染基于缓冲图像,则存储对缓冲图像的引用 (WEAK_REFERENCE))
|
static Drawable.DrawableHint |
CURRENT_SLIDE
The Common SL Draw API works sometimes cascading, but there are places where the current slide context need to be evaluated, e.g.
(Common SL Draw API 有时会级联,但有些地方需要评估当前幻灯片上下文,例如)
|
static Drawable.DrawableHint |
DEFAULT_CHARSET
Sets the default charset to render text elements.
(设置默认字符集以呈现文本元素。)
|
static Drawable.DrawableHint |
DRAW_FACTORY
DrawFactory which will be used to draw objects into this graphics context
(DrawFactory 将用于将对象绘制到此图形上下文中)
|
static Drawable.DrawableHint |
EMF_FORCE_HEADER_BOUNDS
A boolean value to force the usage of the bounding box, which is specified in the EMF header.
(强制使用边界框的布尔值,在 EMF 标头中指定。)
|
static Drawable.DrawableHint |
FONT_FALLBACK
Key for a font fallback map of type
Map<String,String> which maps the original font family (key) to the fallback font family (value).
(Map 类型的字体后备映射的键
|
static Drawable.DrawableHint |
FONT_HANDLER
Use this object to resolve unknown / missing fonts when rendering slides.
(渲染幻灯片时使用此对象解决未知/丢失的字体。)
|
static Drawable.DrawableHint |
FONT_MAP
Key for a font map of type
Map<String,String> which maps the original font family (key) to the mapped font family (value)
(Map 类型字体映射的键
|
static Drawable.DrawableHint |
GRADIENT_SHAPE
PathGradientPaint needs the shape to be set.
(PathGradientPaint 需要设置形状。)
|
static Drawable.DrawableHint |
GRESTORE |
static Drawable.DrawableHint |
GROUP_TRANSFORM
Key will be internally used to store affine transformation temporarily within group shapes
(密钥将在内部用于在组形状中临时存储仿射变换)
|
static Drawable.DrawableHint |
GSAVE |
static Drawable.DrawableHint |
IMAGE_RENDERER
Use a custom image renderer of an instance of
ImageRenderer
(使用 ImageRenderer 实例的自定义图像渲染器)
|
static Drawable.DrawableHint |
PRESET_GEOMETRY_CACHE
Internal key for caching the preset geometries
(用于缓存预设几何图形的内部密钥)
|
static int |
TEXT_AS_CHARACTERS
draw text via
Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
(通过 Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float) 绘制文本)
|
static int |
TEXT_AS_SHAPES
draw text via
TextLayout.draw(java.awt.Graphics2D, float, float)
(通过 TextLayout.draw(java.awt.Graphics2D, float, float) 绘制文本)
|
static Drawable.DrawableHint |
TEXT_RENDERING_MODE
how to render text:
TEXT_AS_CHARACTERS (default) means to draw via
Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float) .
(如何渲染文本:TEXT_AS_CHARACTERS(默认)表示通过 Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float) 绘制。)
|
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(java.awt.Graphics2D graphics)
Apply 2-D transforms before drawing this shape.
(在绘制此形状之前应用二维变换。)
|
void |
draw(java.awt.Graphics2D graphics)
Draw this shape into the supplied canvas
(将此形状绘制到提供的画布中)
|
void |
drawContent(java.awt.Graphics2D graphics)
draw any content within this shape (image, text, etc.).
(在此形状内绘制任何内容(图像、文本等)。)
|
static final Drawable.DrawableHint DRAW_FACTORY
DrawFactory
which will be used to draw objects into this graphics context
(DrawFactory 将用于将对象绘制到此图形上下文中)
@Internal static final Drawable.DrawableHint GROUP_TRANSFORM
static final Drawable.DrawableHint IMAGE_RENDERER
ImageRenderer
(使用 ImageRenderer 实例的自定义图像渲染器)
static final Drawable.DrawableHint TEXT_RENDERING_MODE
TEXT_AS_CHARACTERS
(default) means to draw via
Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
. This mode draws text as characters. Use it if the target graphics writes the actual character codes instead of glyph outlines (PDFGraphics2D, SVGGraphics2D, etc.)
TEXT_AS_SHAPES
means to render via
TextLayout.draw(java.awt.Graphics2D, float, float)
. This mode draws glyphs as shapes and provides some advanced capabilities such as justification and font substitution. Use it if the target graphics is an image.
(如何渲染文本:TEXT_AS_CHARACTERS(默认)表示通过 Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float) 绘制。此模式将文本绘制为字符。如果目标图形写入实际字符代码而不是字形轮廓(PDFGraphics2D、SVGGraphics2D 等),则使用它。TEXT_AS_SHAPES 表示通过 TextLayout.draw(java.awt.Graphics2D, float, float) 进行渲染。此模式将字形绘制为形状并提供一些高级功能,例如对齐和字体替换。如果目标图形是图像,请使用它。)
static final Drawable.DrawableHint GRADIENT_SHAPE
static final Drawable.DrawableHint PRESET_GEOMETRY_CACHE
static final int TEXT_AS_CHARACTERS
Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
(通过 Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float) 绘制文本)
static final int TEXT_AS_SHAPES
TextLayout.draw(java.awt.Graphics2D, float, float)
(通过 TextLayout.draw(java.awt.Graphics2D, float, float) 绘制文本)
static final Drawable.DrawableHint FONT_HANDLER
DrawFontManager
.
In case a FONT_HANDLER
is register, FONT_FALLBACK
and FONT_MAP
are ignored
static final Drawable.DrawableHint FONT_FALLBACK
Map<String,String>
which maps the original font family (key) to the fallback font family (value). In case there is also a
FONT_MAP
registered, the original font is first mapped via the font_map and then the fallback font is determined
(Map 类型的字体后备映射的键
static final Drawable.DrawableHint FONT_MAP
Map<String,String>
which maps the original font family (key) to the mapped font family (value)
(Map 类型字体映射的键
static final Drawable.DrawableHint GSAVE
static final Drawable.DrawableHint GRESTORE
static final Drawable.DrawableHint CURRENT_SLIDE
static final Drawable.DrawableHint BUFFERED_IMAGE
static final Drawable.DrawableHint DEFAULT_CHARSET
Charset
(设置默认字符集以呈现文本元素。与 POI 中的其他 Windows 库相反,这只是默认为 Windows-1252。渲染值是 Charset 类型)
static final Drawable.DrawableHint EMF_FORCE_HEADER_BOUNDS
FALSE
- in this case the records are scanned for window and viewport records to determine the initial bounding box by using the following condition:
isValid(viewport) ? viewport : isValid(window) ? window : headerBounds
This is a workaround switch, which might be removed in future releases, when the bounding box determination for the special cases is fixed. In most cases it's recommended to leave the default value.
(强制使用边界框的布尔值,在 EMF 标头中指定。默认为 FALSE - 在这种情况下,通过使用以下条件扫描记录以查找窗口和视口记录以确定初始边界框: isValid(viewport) ?视口:isValid(窗口)? window : headerBounds 这是一个变通方法开关,当特殊情况的边界框确定固定时,可能会在以后的版本中删除。在大多数情况下,建议保留默认值。)void applyTransform(java.awt.Graphics2D graphics)
graphics
- the graphics whos transform matrix will be modified
(graphics - 将修改变换矩阵的图形)
void draw(java.awt.Graphics2D graphics)
graphics
- the graphics to draw into
(graphics - 要绘制的图形)
void drawContent(java.awt.Graphics2D graphics)
graphics
- the graphics to draw into
(graphics - 要绘制的图形)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.