本文整理汇总了C++中Drawable::fill方法的典型用法代码示例。如果您正苦于以下问题:C++ Drawable::fill方法的具体用法?C++ Drawable::fill怎么用?C++ Drawable::fill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drawable
的用法示例。
在下文中一共展示了Drawable::fill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validate
void DrawableStatsAttachment::validate(void)
{
commitChanges();
// Still valid? Do nothing.
if(getValid())
return;
AttachmentContainer *cont =
dynamic_cast<AttachmentContainer *>(this->getParents(0));
// Called on a non-AttachmentContainer?
if(cont == NULL)
return;
reset();
// Drawable?
Drawable *g = dynamic_cast<Drawable *>(cont);
if(g != NULL)
{
//calc(g);
g->fill(this);
}
// Node?
Node *n = dynamic_cast<Node *>(cont);
if(n != NULL)
{
// Validate the core
Drawable *g = dynamic_cast<Drawable *>(n->getCore());
if(g != NULL)
{
DrawableStatsAttachmentUnrecPtr s = get(g);
if(s == NULL)
{
s = DrawableStatsAttachment::addTo(g);
}
s->validate();
*this += s;
setValid(false); // Not done yet.
}
// Validate all the children
for(UInt32 i = 0; i < n->getNChildren(); ++i)
{
Node *c = n->getChild(i);
DrawableStatsAttachmentUnrecPtr s = get(c);
if(s == NULL)
{
s = DrawableStatsAttachment::addTo(c);
}
s->validate();
*this += s;
setValid(false); // Not done yet.
}
}
setValid(true); // Done!
}