public abstract class GlyphVector extends Object implements Cloneable
GlyphVector
对象集合包含几何信息的符号,每个符号的位置在转换后的坐标空间对应的设备上,
GlyphVector
最终显示。
不尝试的GlyphVector
字形包含序列的任何解释。在序列相邻符号关系仅仅是用来确定在视觉坐标空间符号的位置。
实例GlyphVector
由Font
创建。
一个能缓存文本中间表示的文字处理程序,生成和随后的缓存一个GlyphVector
期间使用渲染的是人物的视觉表现呈现给用户最快的方法。
一个GlyphVector
是一个Font
相关,并能提供数据与此Font
有用。此外,从GlyphVector
得到的指标不是一般的几何扩展自走,间距取决于网格拟合算法在Font
。方便的GlyphVector
及其组成字形的精确测量,你必须指定一个缩放变换,抗混叠模式,和分数度量模式创建GlyphVector
时。这些特性可以来自目的地设备。
每个字形的GlyphVector
,你可以获得:
GlyphVector
上下文字形度量。字形的指标可能在不同的变换不同,提示指定渲染应用和具体实例的字形在GlyphVector
。更改用于创建GlyphVector
数据并没有改变的GlyphVector
状态。
设有调整在GlyphVector
象形文字的位置的方法。这些方法是最合适的,是象形文字的表现进行对齐操作的应用。
提供个人字形变换在GlyphVector
方法。这些方法主要是有用的特殊效果。
提供返回视觉、逻辑的方法,和像素的边界的整个GlyphVector
或单个符号在GlyphVector
。
提供返回的GlyphVector
Shape
方法,和个人的符号在GlyphVector
。
Font
,
GlyphMetrics
,
TextLayout
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_COMPLEX_GLYPHS
与getlayoutflags表明这
GlyphVector 具有复杂的象形文字字符映射使用的标志(一个没有Map符号字符一一严格升序或降序匹配运行方向)。
|
static int |
FLAG_HAS_POSITION_ADJUSTMENTS
与getlayoutflags表明这
GlyphVector 位置调整使用的国旗。
|
static int |
FLAG_HAS_TRANSFORMS
国旗用getlayoutflags表明这
GlyphVector 每字形变换。
|
static int |
FLAG_MASK
一个支持的旗帜getlayoutflags面具。
|
static int |
FLAG_RUN_RTL
与getlayoutflags表明这
GlyphVector 有右向左运行方向使用国旗。
|
Constructor and Description |
---|
GlyphVector() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(GlyphVector set)
如果指定的
GlyphVector 恰好等于这
GlyphVector 。
|
abstract Font |
getFont()
返回与此相关的
Font
GlyphVector 。
|
abstract FontRenderContext |
getFontRenderContext()
返回与此相关的
FontRenderContext
GlyphVector 。
|
int |
getGlyphCharIndex(int glyphIndex)
返回指定标志符号的字符索引。
|
int[] |
getGlyphCharIndices(int beginGlyphIndex, int numEntries, int[] codeReturn)
返回指定的字符索引符号。
|
abstract int |
getGlyphCode(int glyphIndex)
返回指定字形的glyphcode。
|
abstract int[] |
getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)
返回指定字形的glyphcodes数组。
|
abstract GlyphJustificationInfo |
getGlyphJustificationInfo(int glyphIndex)
返回指定索引处到这
GlyphVector 字形的正当性信息。
|
abstract Shape |
getGlyphLogicalBounds(int glyphIndex)
返回指定符号的逻辑范围内这
GlyphVector 。
|
abstract GlyphMetrics |
getGlyphMetrics(int glyphIndex)
返回的字形信息在指定的索引这个
GlyphVector 。
|
abstract Shape |
getGlyphOutline(int glyphIndex)
返回一个
Shape 其内部对应于指定的符号的视觉表现在这
GlyphVector 。
|
Shape |
getGlyphOutline(int glyphIndex, float x, float y)
返回一个
Shape 其内部对应于指定的符号的视觉表现在这
GlyphVector ,抵消X, Y.
|
Rectangle |
getGlyphPixelBounds(int index, FontRenderContext renderFRC, float x, float y)
返回的字形索引像素边界时
GlyphVector 是一个给定
FontRenderContext 在给定位置
Graphics 渲染。
|
abstract Point2D |
getGlyphPosition(int glyphIndex)
返回相对于这
GlyphVector 起源的规定符号的位置。
|
abstract float[] |
getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)
返回指定字形字形位置数组。
|
abstract AffineTransform |
getGlyphTransform(int glyphIndex)
返回指定字形变换在这
GlyphVector 。
|
abstract Shape |
getGlyphVisualBounds(int glyphIndex)
返回指定符号的视觉范围内的
GlyphVector 。
|
int |
getLayoutFlags()
返回标记描述的glyphvector全局状态。
|
abstract Rectangle2D |
getLogicalBounds()
返回该
GlyphVector 逻辑界限。
|
abstract int |
getNumGlyphs()
返回在这
GlyphVector 符号数。
|
abstract Shape |
getOutline()
返回一个
Shape 其内部对应于该
GlyphVector 视觉表现。
|
abstract Shape |
getOutline(float x, float y)
返回一个
Shape 其内部对应于该
GlyphVector 视觉表现呈现在X,Y
|
Rectangle |
getPixelBounds(FontRenderContext renderFRC, float x, float y)
返回该
GlyphVector 像素边界时,呈现在一个给定
FontRenderContext 在给定位置的图形。
|
abstract Rectangle2D |
getVisualBounds()
返回视觉界的这种
GlyphVector 视觉范围是本
GlyphVector 轮廓包围盒。
|
abstract void |
performDefaultLayout()
指定默认位置,每个符号在这
GlyphVector 。
|
abstract void |
setGlyphPosition(int glyphIndex, Point2D newPos)
设置指定符号的位置在这个
GlyphVector 。
|
abstract void |
setGlyphTransform(int glyphIndex, AffineTransform newTX)
设置指定字形变换在这
GlyphVector 。
|
public static final int FLAG_HAS_TRANSFORMS
GlyphVector
每字形变换。
public static final int FLAG_HAS_POSITION_ADJUSTMENTS
GlyphVector
位置调整使用的国旗。如果这是真的,字形位置不匹配的累积违约提出的符号(例如,如果废弃了)。
public static final int FLAG_RUN_RTL
GlyphVector
有右向左运行方向使用国旗。这是指字形字符映射并不意味着象形文字的视觉位置一定要按照顺序,但他们一般会。
public static final int FLAG_COMPLEX_GLYPHS
GlyphVector
具有复杂的象形文字字符映射使用的标志(一个没有Map符号字符一一严格升序或降序匹配运行方向)。
public static final int FLAG_MASK
public abstract Font getFont()
Font
GlyphVector
。
Font
用于创建此
GlyphVector
。
Font
public abstract FontRenderContext getFontRenderContext()
FontRenderContext
GlyphVector
。
FontRenderContext
用于创建此
GlyphVector
。
FontRenderContext
,
Font
public abstract void performDefaultLayout()
GlyphVector
。这会破坏这
GlyphVector
初始布局过程中产生的信息。
public abstract int getNumGlyphs()
GlyphVector
符号数。
GlyphVector
符号数。
public abstract int getGlyphCode(int glyphIndex)
GlyphVector
的
Font
对象毫无意义。
glyphIndex
-索引这个
GlyphVector
对应的字形检索glyphcode。
glyphIndex
字形的glyphcode。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
public abstract int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)
GlyphVector
的
Font
毫无意义。这个方法是用来方便处理时的性能glyphcodes。如果没有传递数组,则创建一个新的数组。
beginGlyphIndex
-索引这个
GlyphVector
,开始检索glyphcodes
numEntries
- glyphcodes号码检索
codeReturn
-接收glyphcodes然后返回数组
IllegalArgumentException
-如果
numEntries
小于0
IndexOutOfBoundsException
-如果
beginGlyphIndex
小于0
IndexOutOfBoundsException
-如果
beginGlyphIndex
和
numEntries
之和大于该
GlyphVector
符号数
public int getGlyphCharIndex(int glyphIndex)
glyphIndex
-字形索引
public int[] getGlyphCharIndices(int beginGlyphIndex, int numEntries, int[] codeReturn)
beginGlyphIndex
-一字形索引
numEntries
-字形索引的数量
codeReturn
的数组,返回的字符索引
public abstract Rectangle2D getLogicalBounds()
GlyphVector
逻辑界限。运用这种方法时,这
GlyphVector
定位与视觉上相邻的
GlyphVector
对象。
Rectangle2D
是这个
GlyphVector
逻辑界限。
public abstract Rectangle2D getVisualBounds()
GlyphVector
视觉范围是本
GlyphVector
轮廓包围盒。由于光栅化和排列的像素,它是可能的,这个盒子不附上这
GlyphVector
影响所有像素渲染。
Rectangle2D
是这个
GlyphVector
包围盒。
public Rectangle getPixelBounds(FontRenderContext renderFRC, float x, float y)
GlyphVector
像素边界时,呈现在一个给定
FontRenderContext
在给定位置的图形。的renderfrc不需要为这个
GlyphVector
的
FontRenderContext
相同,并可以为空。如果它是空的,这
GlyphVector
的
FontRenderContext
使用。默认的实现返回的视觉范围,弥补X、Y和圆形的到下一个整数值(即返回一个整数的矩形包围的视觉范围)和忽略了FRC。subclassers应重写此方法。
renderFRC
的
Graphics
的
FontRenderContext
。
x
-位置的x坐标渲染这
GlyphVector
。
y
-在纵坐标绘制这
GlyphVector
。
Rectangle
包围的像素会有影响。
public abstract Shape getOutline()
Shape
其内部对应于该
GlyphVector
视觉表现。
Shape
是这个
GlyphVector
概述。
public abstract Shape getOutline(float x, float y)
Shape
其内部对应于该
GlyphVector
视觉表现呈现在X,Y
x
-这
GlyphVector
X坐标。
y
-这
GlyphVector
Y坐标。
Shape
概述本
GlyphVector
渲染时在指定的坐标。
public abstract Shape getGlyphOutline(int glyphIndex)
Shape
其内部对应于指定的符号的视觉表现在这
GlyphVector
。通过这种方法返回的轮廓定位在每个单独的字形的原点周围。
glyphIndex
-索引这个
GlyphVector
Shape
位于指定
glyphIndex
这
GlyphVector
字形的轮廓。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
public Shape getGlyphOutline(int glyphIndex, float x, float y)
Shape
其内部对应于指定的符号的视觉表现在这
GlyphVector
,抵消X,Y 概述该方法返回的是定位在每个符号的起源。
glyphIndex
-索引这个
GlyphVector
x
-这
GlyphVector
位置的x坐标
y
-这
GlyphVector
位置的y坐标
Shape
轮廓字形在指定的
glyphIndex
这
GlyphVector
渲染时在指定的坐标。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
public abstract Point2D getGlyphPosition(int glyphIndex)
GlyphVector
起源的规定符号的位置。如果
glyphIndex
等于数量的符号在这
GlyphVector
,此方法返回的立场上的铭文后。这个位置是用来定义整个
GlyphVector
前进。
glyphIndex
-索引这个
GlyphVector
Point2D
对象是象形文字在指定的位置
glyphIndex
。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于这个
GlyphVector
符号数
setGlyphPosition(int, java.awt.geom.Point2D)
public abstract void setGlyphPosition(int glyphIndex, Point2D newPos)
GlyphVector
。如果
glyphIndex
等于数量的符号在这
GlyphVector
,此方法设置立场上的铭文后。这个位置是用来定义整个
GlyphVector
前进。
glyphIndex
-索引这个
GlyphVector
newPos
-在这
Point2D
定位在指定的
glyphIndex
雕文
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于这个
GlyphVector
符号数
getGlyphPosition(int)
public abstract AffineTransform getGlyphTransform(int glyphIndex)
GlyphVector
。变换是相对于符号位置。如果没有特殊的变换已经广泛的应用,
null
可以返回。一个空返回表示一个身份转换。
glyphIndex
-索引这个
GlyphVector
AffineTransform
是变换的字形在指定的
glyphIndex
。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
setGlyphTransform(int, java.awt.geom.AffineTransform)
public abstract void setGlyphTransform(int glyphIndex, AffineTransform newTX)
GlyphVector
。变换是相对于符号位置。一种说法
newTX
null
表示没有特殊的变换应用于指定的符号。此方法可用于旋转、镜像、平移和尺度符号化。添加一个变换可能会导致显着的性能变化。
glyphIndex
-索引这个
GlyphVector
newTX
-新的变换的字形在
glyphIndex
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
getGlyphTransform(int)
public int getLayoutFlags()
FLAG_HAS_POSITION_ADJUSTMENTS
,
FLAG_HAS_TRANSFORMS
,
FLAG_RUN_RTL
,
FLAG_COMPLEX_GLYPHS
,
FLAG_MASK
public abstract float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)
beginGlyphIndex + position/2
雕文。奇数数组开始位置是Y坐标的符号编号
beginGlyphIndex + (position-1)/2
。如果
beginGlyphIndex
等于数量的符号在这
GlyphVector
,这个方法的最后一个符号后,这个位置是用来定义整个
GlyphVector
提前获取位置。
beginGlyphIndex
-在该指数开始检索符号的位置
numEntries
-符号号码检索
positionReturn
-接收符号的位置,然后返回数组。
numEntries
beginGlyphIndex
指定数组。
IllegalArgumentException
-如果
numEntries
小于0
IndexOutOfBoundsException
-如果
beginGlyphIndex
小于0
IndexOutOfBoundsException
-如果
beginGlyphIndex
和
numEntries
总和大于数量的符号在这
GlyphVector
加一
public abstract Shape getGlyphLogicalBounds(int glyphIndex)
GlyphVector
。这些逻辑范围共有四个边,两边缘平行于基线下字形的变换和其他的两个边缘与相邻符号共享如果存在。该方法可用于指定字形点击测试,一个符号在前沿或后沿一字形定位,并绘制高亮区域在指定的符号。
glyphIndex
-索引这个
GlyphVector
对应的字形来检索逻辑范围
Shape
位于指定
glyphIndex
字形的逻辑界限。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
getGlyphVisualBounds(int)
public abstract Shape getGlyphVisualBounds(int glyphIndex)
GlyphVector
。由该方法返回的边界被定位在每个单独的字形的原点周围。
glyphIndex
-索引这个
GlyphVector
对应的字形检索其视觉范围
Shape
位于指定
glyphIndex
字形的视觉范围。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
getGlyphLogicalBounds(int)
public Rectangle getGlyphPixelBounds(int index, FontRenderContext renderFRC, float x, float y)
GlyphVector
是一个给定
FontRenderContext
在给定位置
Graphics
渲染。的renderfrc不需要为这个
GlyphVector
的
FontRenderContext
相同,并可以为空。如果它是空的,这
GlyphVector
的
FontRenderContext
使用。默认实现将返回字符的视觉范围,弥补X、Y和圆形的到下一个整数值,而忽略了FRC。subclassers应重写此方法。
index
-字形索引。
renderFRC
的
Graphics
的
FontRenderContext
。
x
- X的位置,使这
GlyphVector
。
y
- Y位置,使这
GlyphVector
。
Rectangle
包围的像素会有影响。
public abstract GlyphMetrics getGlyphMetrics(int glyphIndex)
GlyphVector
。
glyphIndex
-索引这个
GlyphVector
对应的字形来检索它的度量
GlyphMetrics
表示的字形信息在指定的
glyphIndex
这
GlyphVector
。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
public abstract GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
GlyphVector
字形的正当性信息。
glyphIndex
-索引这个
GlyphVector
对应的字形检索其正当性性质
GlyphJustificationInfo
表示字形的正当性属性在指定的
glyphIndex
这
GlyphVector
。
IndexOutOfBoundsException
-如果
glyphIndex
小于0或大于或等于该
GlyphVector
符号数
public abstract boolean equals(GlyphVector set)
GlyphVector
恰好等于这
GlyphVector
。
set
-指定
GlyphVector
测试
true
如果指定
GlyphVector
等于这
GlyphVector
;
false
否则。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.