本文整理汇总了C++中LEReferenceTo::process方法的典型用法代码示例。如果您正苦于以下问题:C++ LEReferenceTo::process方法的具体用法?C++ LEReferenceTo::process怎么用?C++ LEReferenceTo::process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LEReferenceTo
的用法示例。
在下文中一共展示了LEReferenceTo::process方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
U_NAMESPACE_BEGIN
le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
switch(SWAPW(subtableFormat))
{
case 0:
return 0;
case 1:
{
const LEReferenceTo<PairPositioningFormat1Subtable> subtable(base, success, (const PairPositioningFormat1Subtable *) this);
if(LE_SUCCESS(success))
return subtable->process(subtable, glyphIterator, fontInstance, success);
else
return 0;
}
case 2:
{
const LEReferenceTo<PairPositioningFormat2Subtable> subtable(base, success, (const PairPositioningFormat2Subtable *) this);
if(LE_SUCCESS(success))
return subtable->process(subtable, glyphIterator, fontInstance, success);
else
return 0;
}
default:
return 0;
}
}
示例2: process
U_NAMESPACE_BEGIN
le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
switch(SWAPW(subtableFormat))
{
case 0:
return 0;
case 1:
{
const LEReferenceTo<SingleSubstitutionFormat1Subtable> subtable(base, success, (const SingleSubstitutionFormat1Subtable *) this);
return subtable->process(subtable, glyphIterator, success, filter);
}
case 2:
{
const LEReferenceTo<SingleSubstitutionFormat2Subtable> subtable(base, success, (const SingleSubstitutionFormat2Subtable *) this);
return subtable->process(subtable, glyphIterator, success, filter);
}
default:
return 0;
}
}
示例3: process
U_NAMESPACE_BEGIN
void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
{
le_uint32 chainCount = SWAPL(this->nChains);
LEReferenceTo<ChainHeader> chainHeader(base, success, chains); // moving header
LEReferenceToArrayOf<ChainHeader> chainHeaderArray(base, success, chains, chainCount);
le_uint32 chain;
for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain += 1) {
if (chain > 0) {
le_uint32 chainLength = SWAPL(chainHeader->chainLength);
if (chainLength & 0x03) { // incorrect alignment for 32 bit tables
success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
return;
}
chainHeader.addOffset(chainLength, success);
}
FeatureFlags defaultFlags = SWAPL(chainHeader->defaultFlags);
le_int16 nFeatureEntries = SWAPW(chainHeader->nFeatureEntries);
le_int16 nSubtables = SWAPW(chainHeader->nSubtables);
LEReferenceTo<MorphSubtableHeader> subtableHeader =
LEReferenceTo<MorphSubtableHeader>(chainHeader,success, &(chainHeader->featureTable[nFeatureEntries]));
le_int16 subtable;
for (subtable = 0; LE_SUCCESS(success) && (subtable < nSubtables); subtable += 1) {
if (subtable > 0) {
le_int16 length = SWAPW(subtableHeader->length);
if (length & 0x03) { // incorrect alignment for 32 bit tables
success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
return;
}
subtableHeader.addOffset(length, success);
}
SubtableCoverage coverage = SWAPW(subtableHeader->coverage);
FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
// should check coverage more carefully...
if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0 && LE_SUCCESS(success)) {
subtableHeader->process(subtableHeader, glyphStorage, success);
}
}
}
}