public class GFXMapping extends Object
Logically, a mapping is represented by a set of (possibly disjoint) character indexes and a set of (possibly disjoint) glyph indexes. In other words, a mapping can be thought of as containing a pair of arrays. The implementation may choose a more efficient representation for common cases.
Constructor and Description |
---|
GFXMapping()
Default constructor.
|
GFXMapping(GFXMapping oSource)
Copy constructor.
|
GFXMapping(int nCharIndex,
int nGlyphIndex) |
GFXMapping(int nCharIndex,
int nGlyphIndex,
int nCharLength) |
GFXMapping(int nCharIndex,
int nGlyphIndex,
int nCharLength,
int nGlyphLength)
Constructor that initializes the mapping to represent a contiguous
run of characters and a contiguous run of glyphs.
|
Modifier and Type | Method and Description |
---|---|
void |
addCharIndex(int nCharIndex)
Add another character index to the set of characters represented by
this mapping.
|
void |
addGlyphIndex(int nGlyphIndex)
Add another glyph index to the set of glyphs represented by this
mapping.
|
void |
copyFrom(GFXMapping oSource)
Assignment operator.
|
int |
getCharCount()
Return the number of character indexes currently in the mapping.
|
int |
getCharIndex(int nIndex)
Extract one character index from the mapping.
|
int |
getGlyphCount()
Return the number of glyph indexes currently in the mapping.
|
int |
getGlyphIndex(int nIndex)
Extract one glyph index from the mapping.
|
int |
getHighestCharIndex()
Return the highest character index from the mapping.
|
int |
getHighestGlyphIndex()
Return the highest glyph index from the mapping.
|
int |
getLowestCharIndex()
Return the lowest character index from the mapping.
|
int |
getLowestGlyphIndex()
Return the lowest glyph index from the mapping.
|
public GFXMapping()
The mapping is initialized to an invalid state. The set of characters and the set of glyphs are both empty. Adding such a mapping to a mapping list is an error.
public GFXMapping(GFXMapping oSource)
oSource
- - Source mapping object to copy.public GFXMapping(int nCharIndex, int nGlyphIndex, int nCharLength, int nGlyphLength)
The client specifies the mapping in terms of four parameters identifying both a sequential run of characters and a sequential run of glyphs. Given the parameter names listed in the method declaration, the mapping is interpreted as the nCharLength characters in the Unicode text, starting at index nCharIndex, map to the nGlyphLength glyphs in the rendering starting at nGlyphIndex.
nCharIndex
- - Starting character index of the mapping.nGlyphIndex
- - Starting glyph index of the mapping.nCharLength
- - Number of consecutive Unicode characters in the
mapping.nGlyphLength
- - Number of consecutive glyphs in the mapping.public GFXMapping(int nCharIndex, int nGlyphIndex, int nCharLength)
public GFXMapping(int nCharIndex, int nGlyphIndex)
public void addCharIndex(int nCharIndex)
This method is typically called only if the mapping represents a set of non-contiguous characters in the Unicode text.
nCharIndex
- - Character index to add to the mapping.public int getCharCount()
public int getCharIndex(int nIndex)
The character indexes themselves are indexed from zero up to one less than the value returned by GetCharCount().
nIndex
- - Index of the desired character index.public int getLowestCharIndex()
The lowest character index may not be the first in the list of character index, depending on the order added. It is an error to call this method if the mapping contains no character index values.
public int getHighestCharIndex()
The highest character index may not be the last in the list of character index, depending on the order added. It is an error to call this method if the mapping contains no character index values.
public void addGlyphIndex(int nGlyphIndex)
This method is typically called only if the mapping represents a set of non-contiguous glyphs in the Unicode text.
nGlyphIndex
- - Glyphacter index to add to the mapping.public int getGlyphCount()
public int getGlyphIndex(int nIndex)
The glyph indexes themselves are indexed from zero up to one less than the value returned by GetGlyphCount().
nIndex
- - Index of the desired glyph index.public int getLowestGlyphIndex()
The lowest glyph index may not be the first in the list of glyph index, depending on the order added. It is an error to call this method if the mapping contains no glyph index values.
public int getHighestGlyphIndex()
The highest glyph index may not be the last in the list of glyph index, depending on the order added. It is an error to call this method if the mapping contains no glyph index values.
public void copyFrom(GFXMapping oSource)
This mapping's content is replaced with a copy of the content from the given mapping.
oSource
- - Source mapping object to copy.Copyright © 2010 - 2020 Adobe. All Rights Reserved