本文整理汇总了C++中Render::RecorderStop方法的典型用法代码示例。如果您正苦于以下问题:C++ Render::RecorderStop方法的具体用法?C++ Render::RecorderStop怎么用?C++ Render::RecorderStop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::RecorderStop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _InternalDraw
void UIBase::_InternalDraw(Render& drawer) {
if (!this->ShouldRender) return;
Vector2 oldoffset = drawer.GetDrawingOffset();
Vector2 pos = this->GetAbsoluteLocation();
drawer.SetDrawingOffset((int)pos.X, (int)pos.Y);
drawer.EnableClipping((int)pos.X, (int)pos.Y, this->W, this->H);
bool recorderstarted = false;
if (this->ShouldRedraw) {
drawer.RecorderStart();
recorderstarted = true;
}
if (!this->Frozen && (this->ShouldRedraw || this->AlwaysRedraw)) {
this->OnDraw(drawer);
} else if(this->Buffer != nullptr) {
drawer.Buffer(this->Buffer);
}
if (recorderstarted) {
if (this->Buffer != nullptr) delete this->Buffer;
this->Buffer = drawer.RecorderStop();
this->ShouldRedraw = false;
}
for (unsigned int i = 0; i < this->Children.size(); i++) {
UIBase* p = this->Children[i];
Vector2 pos2 = p->GetAbsoluteLocation();
if (pos2.X + p->W < drawer._ClippingPos.X) continue;
if (pos2.Y + p->H < drawer._ClippingPos.Y) continue;
if (pos2.X > drawer._ClippingPos.X + drawer._ClippingSize.X) continue;
if (pos2.Y > drawer._ClippingPos.Y + drawer._ClippingSize.Y) continue;
p->_InternalDraw(drawer);
}
drawer.SetDrawingOffset((int)oldoffset.X, (int)oldoffset.Y);
drawer.DisableClipping();
}