Logo Search packages:      
Sourcecode: icu version File versions  Download package

void LEGlyphStorage::setPosition ( le_int32  glyphIndex,
float  x,
float  y,
LEErrorCode success 
)

Set the X, Y position for a particular glyph.

Parameters:
glyphIndex the index of the glyph
x the new X position
y the new Y position
success will be set to an error code if the position cannot be set.
ICU 3.0

Definition at line 426 of file LEGlyphStorage.cpp.

References fGlyphCount, fPositions, LE_FAILURE, and LE_INDEX_OUT_OF_BOUNDS_ERROR.

Referenced by LayoutEngine::positionGlyphs().

{
    if (LE_FAILURE(success)) {
        return;
    }
    
    if (glyphIndex < 0 || glyphIndex > fGlyphCount) {
      success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
      return;
    }
    
    fPositions[glyphIndex * 2]     = x;
    fPositions[glyphIndex * 2 + 1] = y;
}


Generated by  Doxygen 1.6.0   Back to index