diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-10-06 12:16:52 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-10-06 12:17:28 +1100 |
commit | 1bc6b366f76d17c3c85b94448e1203382dc78c61 (patch) | |
tree | e0dc08e434c97c018a30ea490940ca977c002af7 /include/vcl/metric.hxx | |
parent | 9177329a425cf70b515d1f266132838894fe54c6 (diff) |
vcl: document FontCharMap class
Change-Id: I3020c0979ff8ab6b9e959f32d25af9f51857d821
Diffstat (limited to 'include/vcl/metric.hxx')
-rw-r--r-- | include/vcl/metric.hxx | 85 |
1 files changed, 79 insertions, 6 deletions
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index 0bc977a408a9..354da1a462f3 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -100,22 +100,95 @@ private: ImplFontCharMapPtr mpImplFontCharMap; public: + /** A new FontCharMap is created based on a "default" map, which includes + all codepoints in the Unicode BMP range, including surrogates. + **/ FontCharMap(); ~FontCharMap(); - bool IsDefaultMap( void ) const; + /** Determines if the font character map is the "default". The default map + includes all codepoints in the Unicode BMP range, including surrogates. + + @returns true if default map, false if not default map. + */ + bool IsDefaultMap() const; + + /** Does the font character map include the UCS4 character? + + @returns true if character exists in font character map, false is not. + */ bool HasChar( sal_UCS4 ) const; + + + UCS4 codepoints. + + @param cMin Lowest codepoint in range to be counted + @param cMax Highest codepoitn in range to be counted + + @returns number of characters in the font charmap between the two + codepoints. + */ int CountCharsInRange( sal_UCS4 cMin, sal_UCS4 cMax ) const; - int GetCharCount( void ) const; + /** Get the number of characters in the font character map. + + @returns number of characters in the font character map. + */ + int GetCharCount() const; + + /** Get the first character in the font character map. + + @returns first character in the font character map. + */ sal_UCS4 GetFirstChar() const; + + /** Get the last character in the font character map. + + @returns last character in the font character map. + */ sal_UCS4 GetLastChar() const; - sal_UCS4 GetNextChar( sal_UCS4 ) const; - sal_UCS4 GetPrevChar( sal_UCS4 ) const; + /** Get the next character in the font character map. This is important + because character maps (e.g. the default map which holds the characters + in the BMP plane) can have discontiguous ranges. + + @param cChar Character from which to find next character + + @returns next character in the font character map. + */ + sal_UCS4 GetNextChar( sal_UCS4 cChar ) const; + + /** Get the previous character in the font character map. This is important + because character maps (e.g. the default map which holds the characters + in the BMP plane) can have discontiguous ranges. + + @param cChar Character from which to find previous character + + @returns previous character in the font character map. + */ + sal_UCS4 GetPrevChar( sal_UCS4 cChar ) const; + + /** Get the index of a particular character in the font character map. The + index is different from the codepoint, because font character maps can + + determine the index. + + @param cChar Character used to find index number + + @returns Index of character in font character map. + */ + int GetIndexFromChar( sal_UCS4 cChar ) const; + + /** Get the character at a particular index in the font character map. The + index is different from the codepoint, because font character maps can + + determine the character. + + @param nCharIndex Index used to find the character - int GetIndexFromChar( sal_UCS4 ) const; - sal_UCS4 GetCharFromIndex( int ) const; + @returns Character in font character map. + */ + sal_UCS4 GetCharFromIndex( int nCharIndex ) const; private: |