本文整理汇总了C++中NodeAttribute::IsAFlatFill方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeAttribute::IsAFlatFill方法的具体用法?C++ NodeAttribute::IsAFlatFill怎么用?C++ NodeAttribute::IsAFlatFill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeAttribute
的用法示例。
在下文中一共展示了NodeAttribute::IsAFlatFill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BlendAttributes
//.........这里部分代码省略.........
CCRuntimeClass *pTypeStart;
void *pValStart;
void *pValEnd;
double OldBlendRatio = pParam->GetBlendRatio();
// Process each attribute in turn
CCAttrMap::iterator PosStart = pAttrMapStart->GetStartPosition();
CCAttrMap::iterator EndStart = pAttrMapStart->GetEndPosition();
for (;PosStart != EndStart;)
{
// Get a ptr to the attr at position PosStart in the start node's attr map
pAttrMapStart->GetNextAssoc(PosStart,pTypeStart,pValStart);
NodeAttribute* pNodeAttrStart = (NodeAttribute *)pValStart;
BlendRatio = OldBlendRatio;
// Diccon 10/99 When using non-linear profiles for the objects those attributes
// that make use of control points were not being profiled, making the objects look strange.
// to avoid this those attributes now share the same profiles as the objects.
if (pNodeAttrStart->IsAGradFill())
{
if (!((AttrFillGeometry*)pNodeAttrStart)->IsAColourFill())
{
BlendRatio = pParam->GetObjectRatio();
}
else
{
BlendRatio = pParam->GetInvertedAttributeRatio();
}
}
if (pNodeAttrStart->IsAFlatFill() || (pNodeAttrStart->GetRuntimeClass() == CC_RUNTIME_CLASS(AttrLineWidth)))
{
BlendRatio = pParam->GetInvertedAttributeRatio();
}
// Get a blended attribute
NodeAttribute* pBlendedNodeAttr = NULL;
// Find an attr of the same type in the end object's attr list,
// and blend the two attrs together
pValEnd = NULL;
if (pAttrMapEnd->Lookup(pTypeStart,pValEnd))
{
// We've found a matching end attr, so try to blend it with the start attr
// Set up the param object to pass to the start attr's blend method
BlendAttrParam BlendParam;
NodeAttribute * pEndAttr = (NodeAttribute *)pValEnd;
// Initialise the BlendParam with the end attr and blend ratio
if (BlendParam.Init(pParam->GetRenderRegion(),
pEndAttr,BlendRatio,
pParam->GetColourBlendType(),
pAttrMapStart, pAttrMapEnd))
{
// Successfully initialised, so now try blending the attributes
if (pNodeAttrStart->Blend(&BlendParam))
{
// Attrs successfully blended, now get a ptr to the new attr.
// Once we get the blended attr ptr, it belongs to us, so we have
// to delete it when it is not needed