We have bool type, use it for boolean value

This commit is contained in:
Dmitry Marakasov 2014-12-29 06:53:14 +03:00
parent c5554f5853
commit c9d26eaa18
2 changed files with 8 additions and 9 deletions

View File

@ -84,11 +84,11 @@ void Font::SetHinting(int hinting) {
TTF_SetFontHinting(font_, hinting); TTF_SetFontHinting(font_, hinting);
} }
int Font::GetKerning() const { bool Font::GetKerning() const {
return TTF_GetFontKerning(font_); return TTF_GetFontKerning(font_);
} }
void Font::SetKerning(int allowed) { void Font::SetKerning(bool allowed) {
TTF_SetFontKerning(font_, allowed); TTF_SetFontKerning(font_, allowed);
} }

View File

@ -223,20 +223,19 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the current kerning setting of the loaded font /// \brief Get the current kerning setting of the loaded font
/// ///
/// \returns 0 (zero) if kerning is disabled. A non-zero value /// \returns False if kerning is disabled. True when disabled.
/// is returned when enabled. The default for a newly /// The default for a newly loaded font is true, enabled
/// loaded font is enabled (1)
/// ///
/// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC27 /// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC27
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
int GetKerning() const; bool GetKerning() const;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set whther to use kerning when rendering the loaded font /// \brief Set whther to use kerning when rendering the loaded font
/// ///
/// \param allowed 0 to diable kerning, non-zero to enable kerning. /// \param allowed False to diable kerning, true to enable kerning.
/// The default is 1, enabled /// The default is true, enabled
/// ///
/// Set whether to use kerning when rendering the loaded font. /// Set whether to use kerning when rendering the loaded font.
/// This has no effect on individual glyphs, but rather when /// This has no effect on individual glyphs, but rather when
@ -248,7 +247,7 @@ public:
/// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC28 /// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC28
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SetKerning(int allowed); void SetKerning(bool allowed);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the maximum pixel height of all glyphs of the loaded font /// \brief Get the maximum pixel height of all glyphs of the loaded font