mirror of https://github.com/axmolengine/axmol.git
Create a test case for issue 4999(label is unsharp if it's created by smaller font).
This commit is contained in:
parent
e1bb1c62c0
commit
2a6158bae1
|
@ -78,7 +78,8 @@ static std::function<Layer*()> createFunctions[] =
|
|||
CL(LabelTTFOldNew),
|
||||
CL(LabelFontNameTest),
|
||||
CL(LabelAlignmentTest),
|
||||
CL(LabelIssue4428Test)
|
||||
CL(LabelIssue4428Test),
|
||||
CL(LabelIssue4999Test)
|
||||
};
|
||||
|
||||
#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0]))
|
||||
|
@ -1779,3 +1780,21 @@ std::string LabelIssue4428Test::subtitle() const
|
|||
{
|
||||
return "Reorder issue #4428.The label should be flipped vertically.";
|
||||
}
|
||||
|
||||
LabelIssue4999Test::LabelIssue4999Test()
|
||||
{
|
||||
auto label = Label::createWithTTF("Smaller font test", "fonts/arial.ttf",5);
|
||||
label->setPosition(VisibleRect::center());
|
||||
label->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
|
||||
addChild(label);
|
||||
}
|
||||
|
||||
std::string LabelIssue4999Test::title() const
|
||||
{
|
||||
return "New Label Bugs Test";
|
||||
}
|
||||
|
||||
std::string LabelIssue4999Test::subtitle() const
|
||||
{
|
||||
return "Reorder issue #4999.The label should be display cleanly.";
|
||||
}
|
||||
|
|
|
@ -496,6 +496,17 @@ public:
|
|||
virtual std::string subtitle() const override;
|
||||
};
|
||||
|
||||
class LabelIssue4999Test : public AtlasDemoNew
|
||||
{
|
||||
public:
|
||||
CREATE_FUNC(LabelIssue4999Test);
|
||||
|
||||
LabelIssue4999Test();
|
||||
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
};
|
||||
|
||||
// we don't support linebreak mode
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue