mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01: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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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
|
/// \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}};
|
sfGlyph glyph = {0, {0, 0, 0, 0}, {0, 0, 0, 0}};
|
||||||
CSFML_CHECK_RETURN(font, glyph);
|
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);
|
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);
|
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)
|
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)
|
CSFML_CALL_RETURN(font, getUnderlineThickness(characterSize), 0)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user