free( embeddedLevels );
}
+ bool GetMirroredText( Character* text,
+ Length numberOfCharacters ) const
+ {
+ bool updated = false;
+
+ for( CharacterIndex index = 0u; index < numberOfCharacters; ++index )
+ {
+ // Get a reference to the character inside the text.
+ Character& character = *( text + index );
+
+ // Retrieve the mirrored character.
+ FriBidiChar mirroredCharacter = character;
+ const bool mirrored = fribidi_get_mirror_char( character, &mirroredCharacter );
+ updated = updated || mirrored;
+
+ // Update the character inside the text.
+ character = mirroredCharacter;
+ }
+
+ return updated;
+ }
+
Vector<BidirectionalInfo*> mParagraphBidirectionalInfo; ///< Stores the bidirectional info per paragraph.
Vector<BidiInfoIndex> mFreeIndices; ///< Stores indices of free positions in the bidirectional info vector.
};
visualToLogicalMap );
}
+bool BidirectionalSupport::GetMirroredText( Character* text,
+ Length numberOfCharacters )
+{
+ CreatePlugin();
+
+ return mPlugin->GetMirroredText( text, numberOfCharacters );
+}
+
void BidirectionalSupport::CreatePlugin()
{
if( !mPlugin )
Length numberOfCharacters,
CharacterIndex* visualToLogicalMap );
+ /**
+ * @copydoc Dali::BidirectionalSupport::GetMirroredText()
+ */
+ bool GetMirroredText( Character* text,
+ Length numberOfCharacters );
+
private:
/**
visualToLogicalMap );
}
+bool BidirectionalSupport::GetMirroredText( Character* text,
+ Length numberOfCharacters )
+{
+ return GetImplementation( *this ).GetMirroredText( text,
+ numberOfCharacters );
+}
+
} // namespace TextAbstraction
} // namespace Dali
CharacterIndex firstCharacterIndex,
Length numberOfCharacters,
CharacterIndex* visualToLogicalMap );
+
+ /**
+ * @brief Replaces any character which could be mirrored.
+ *
+ * @param[in,out] text The text.
+ * @param[in] numberOfCharacters The number of characters.
+ *
+ * @return @e true if a character has been replaced.
+ */
+ bool GetMirroredText( Character* text,
+ Length numberOfCharacters );
};
} // namespace TextAbstraction