mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-24 13:53:36 +02:00
Merge pull request #122 from crumblingstatue/font-missing-const
Add missing const qualifiers to sfFont methods
This commit is contained in:
commit
55e03e92be
2 files changed
+10
-10
No files matched your search
@@ -97,7 +97,7 @@ CSFML_GRAPHICS_API void sfFont_destroy(sfFont* font);
|
||||
/// \return The corresponding glyph
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold, float outlineThickness);
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(const sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold, float outlineThickness);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the kerning value corresponding to a given pair of characters in a font
|
||||
@@ -110,7 +110,7 @@ CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, uns
|
||||
/// \return Kerning offset, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getKerning(const sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the line spacing value
|
||||
@@ -121,7 +121,7 @@ CSFML_GRAPHICS_API float sfFont_getKerning(sfFont* font, sfUint32 first, sfUint3
|
||||
/// \return Line spacing, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getLineSpacing(const sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of the underline
|
||||
@@ -135,7 +135,7 @@ CSFML_GRAPHICS_API float sfFont_getLineSpacing(sfFont* font, unsigned int charac
|
||||
/// \return Underline position, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlinePosition(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlinePosition(const sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the thickness of the underline
|
||||
@@ -148,7 +148,7 @@ CSFML_GRAPHICS_API float sfFont_getUnderlinePosition(sfFont* font, unsigned int
|
||||
/// \return Underline thickness, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlineThickness(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlineThickness(const sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the texture containing the glyphs of a given size in a font
|
||||
|
||||
@@ -93,7 +93,7 @@ void sfFont_destroy(sfFont* font)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold, float outlineThickness)
|
||||
sfGlyph sfFont_getGlyph(const sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold, float outlineThickness)
|
||||
{
|
||||
sfGlyph glyph = {0, {0, 0, 0, 0}, {0, 0, 0, 0}};
|
||||
CSFML_CHECK_RETURN(font, glyph);
|
||||
@@ -115,28 +115,28 @@ sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, unsigned int character
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize)
|
||||
float sfFont_getKerning(const sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getKerning(first, second, characterSize), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getLineSpacing(sfFont* font, unsigned int characterSize)
|
||||
float sfFont_getLineSpacing(const sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getLineSpacing(characterSize), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getUnderlinePosition(sfFont* font, unsigned int characterSize)
|
||||
float sfFont_getUnderlinePosition(const sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getUnderlinePosition(characterSize), 0)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getUnderlineThickness(sfFont* font, unsigned int characterSize)
|
||||
float sfFont_getUnderlineThickness(const sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getUnderlineThickness(characterSize), 0)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user