本文整理汇总了C++中LEGlyphStorage::moveGlyph方法的典型用法代码示例。如果您正苦于以下问题:C++ LEGlyphStorage::moveGlyph方法的具体用法?C++ LEGlyphStorage::moveGlyph怎么用?C++ LEGlyphStorage::moveGlyph使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LEGlyphStorage
的用法示例。
在下文中一共展示了LEGlyphStorage::moveGlyph方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: finalReordering
void IndicReordering::finalReordering(LEGlyphStorage &glyphStorage, le_int32 count)
{
LEErrorCode success = LE_NO_ERROR;
// Reposition REPH as appropriate
for ( le_int32 i = 0 ; i < count ; i++ ) {
le_int32 tmpAuxData = glyphStorage.getAuxData(i,success);
LEGlyphID tmpGlyph = glyphStorage.getGlyphID(i,success);
if ( ( tmpGlyph != NO_GLYPH ) && (tmpAuxData & rephConsonantMask) && !(tmpAuxData & repositionedGlyphMask)) {
le_bool targetPositionFound = false;
le_int32 targetPosition = i+1;
le_int32 baseConsonantData;
while (!targetPositionFound) {
tmpGlyph = glyphStorage.getGlyphID(targetPosition,success);
tmpAuxData = glyphStorage.getAuxData(targetPosition,success);
if ( tmpAuxData & baseConsonantMask ) {
baseConsonantData = tmpAuxData;
targetPositionFound = true;
} else {
targetPosition++;
}
}
// Make sure we are not putting the reph into an empty hole
le_bool targetPositionHasGlyph = false;
while (!targetPositionHasGlyph) {
tmpGlyph = glyphStorage.getGlyphID(targetPosition,success);
if ( tmpGlyph != NO_GLYPH ) {
targetPositionHasGlyph = true;
} else {
targetPosition--;
}
}
// Make sure that REPH is positioned after any above base or post base matras
//
le_bool checkMatraDone = false;
le_int32 checkMatraPosition = targetPosition+1;
while ( !checkMatraDone ) {
tmpAuxData = glyphStorage.getAuxData(checkMatraPosition,success);
if ( checkMatraPosition >= count || ( (tmpAuxData ^ baseConsonantData) & LE_GLYPH_GROUP_MASK)) {
checkMatraDone = true;
continue;
}
if ( (tmpAuxData & matraMask) &&
(((tmpAuxData & markPositionMask) == aboveBasePosition) ||
((tmpAuxData & markPositionMask) == postBasePosition))) {
targetPosition = checkMatraPosition;
}
checkMatraPosition++;
}
glyphStorage.moveGlyph(i,targetPosition,repositionedGlyphMask);
}
}
}