remove: Node::SetClipEnabled function
This commit is contained in:
parent
7b67d49c93
commit
09c15c9099
|
|
@ -43,7 +43,6 @@ namespace easy2d
|
|||
: visible_(true)
|
||||
, parent_(nullptr)
|
||||
, hash_name_(0)
|
||||
, clip_enabled_(false)
|
||||
, dirty_sort_(false)
|
||||
, dirty_transform_(false)
|
||||
, order_(0)
|
||||
|
|
@ -68,15 +67,10 @@ namespace easy2d
|
|||
if (!visible_)
|
||||
return;
|
||||
|
||||
auto graphics = devices::Graphics::Instance();
|
||||
|
||||
if (clip_enabled_)
|
||||
{
|
||||
graphics->PushClip(final_matrix_, transform_.size);
|
||||
}
|
||||
|
||||
UpdateTransform();
|
||||
|
||||
auto graphics = devices::Graphics::Instance();
|
||||
|
||||
if (children_.IsEmpty())
|
||||
{
|
||||
graphics->SetTransform(final_matrix_);
|
||||
|
|
@ -118,11 +112,6 @@ namespace easy2d
|
|||
child->Visit();
|
||||
}
|
||||
}
|
||||
|
||||
if (clip_enabled_)
|
||||
{
|
||||
graphics->PopClip();
|
||||
}
|
||||
}
|
||||
|
||||
void Node::Update(Duration const& dt)
|
||||
|
|
@ -424,11 +413,6 @@ namespace easy2d
|
|||
dirty_transform_ = true;
|
||||
}
|
||||
|
||||
void Node::SetClipEnabled(bool enabled)
|
||||
{
|
||||
clip_enabled_ = enabled;
|
||||
}
|
||||
|
||||
void Node::SetBorderColor(Color const& color)
|
||||
{
|
||||
border_color_ = color;
|
||||
|
|
|
|||
|
|
@ -256,11 +256,6 @@ namespace easy2d
|
|||
const Size & size
|
||||
);
|
||||
|
||||
// 启用或关闭渲染区域裁剪
|
||||
void SetClipEnabled(
|
||||
bool enabled
|
||||
);
|
||||
|
||||
// 设置节点边缘颜色
|
||||
void SetBorderColor(
|
||||
const Color& color
|
||||
|
|
@ -358,7 +353,6 @@ namespace easy2d
|
|||
float opacity_;
|
||||
int order_;
|
||||
bool visible_;
|
||||
bool clip_enabled_;
|
||||
bool dirty_sort_;
|
||||
bool dirty_transform_;
|
||||
Node* parent_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue