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.