change some APIs for accepting utf8
This commit is contained in:
@@ -361,6 +361,12 @@ namespace paint
|
||||
return (handle_ ? font(handle_) : font_shadow_);
|
||||
}
|
||||
|
||||
::nana::size graphics::text_extent_size(const ::std::string& text) const
|
||||
{
|
||||
throw_not_utf8(text);
|
||||
return text_extent_size(static_cast<std::wstring>(::nana::charset(text, ::nana::unicode::utf8)));
|
||||
}
|
||||
|
||||
nana::size graphics::text_extent_size(const nana::char_t* text) const
|
||||
{
|
||||
return text_extent_size(text, nana::strlen(text));
|
||||
@@ -947,6 +953,12 @@ namespace paint
|
||||
}
|
||||
}
|
||||
|
||||
void graphics::string(const point& pos, const std::string& text)
|
||||
{
|
||||
throw_not_utf8(text);
|
||||
string(pos, static_cast<std::wstring>(::nana::charset(text, ::nana::unicode::utf8)));
|
||||
}
|
||||
|
||||
void graphics::string(nana::point pos, const char_t* str, std::size_t len)
|
||||
{
|
||||
if (handle_ && str && len)
|
||||
|
||||
Reference in New Issue
Block a user