mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
alphabetic textBaseline support. (#1173)
This commit is contained in:
@@ -359,7 +359,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
|
||||
{
|
||||
_impl->setTextBaseline(CanvasTextBaseline::MIDDLE);
|
||||
}
|
||||
else if (textBaseline == "bottom")
|
||||
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
|
||||
{
|
||||
_impl->setTextBaseline(CanvasTextBaseline::BOTTOM);
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
|
||||
{
|
||||
_impl.textBaseLine = CanvasTextBaseline::MIDDLE;
|
||||
}
|
||||
else if (textBaseline == "bottom")
|
||||
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
|
||||
{
|
||||
_impl.textBaseLine = CanvasTextBaseline::BOTTOM;
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
|
||||
{
|
||||
_impl.textBaseLine = CanvasTextBaseline::MIDDLE;
|
||||
}
|
||||
else if (textBaseline == "bottom")
|
||||
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
|
||||
{
|
||||
_impl.textBaseLine = CanvasTextBaseline::BOTTOM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user