本文整理汇总了C++中AttributeValue::MouldIntoStroke方法的典型用法代码示例。如果您正苦于以下问题:C++ AttributeValue::MouldIntoStroke方法的具体用法?C++ AttributeValue::MouldIntoStroke怎么用?C++ AttributeValue::MouldIntoStroke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeValue
的用法示例。
在下文中一共展示了AttributeValue::MouldIntoStroke方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessPath
//.........这里部分代码省略.........
}
// And render away
pRender->SaveContext();
Node* pNode = pBrush->FindFirstForUnclippedInkRender(pRender);
while (pNode)
{
// Prepare the stroker to stroke this sub-stroke
Stroker.PrepareToStroke(pEdgeList);
if (pNode->IsAnAttribute())
{
// If we are overriding the fill/transparency with the one applied to the stroke,
// then we simply throw away all fill/transparency attributes as we render
// (We do this on the fly rather than as we make the brush so that the user can
// toggle this mode on and off at any time if they change their mind)
BOOL RenderIt = TRUE;
if ( (pStrokeDef->OverrideFill() && ((NodeAttribute *)pNode)->IsAColourFill()) ||
(pStrokeDef->OverrideFill() && ((NodeAttribute *)pNode)->IsAStrokeColour()) ||
(pStrokeDef->OverrideTrans() && ((NodeAttribute *)pNode)->IsAStrokeTransp()) ||
(pStrokeDef->OverrideTrans() && ((NodeAttribute *)pNode)->IsATranspFill()) )
{
RenderIt = FALSE;
}
if (RenderIt)
{
// We must modify all attributes to lie in the destination stroke.
// This includes fill/trans geometry endpoints, line widths, and
// also possibly modifying transparency levels to allow a flat transparency
// to be applied to the whole stroke.
AttributeValue *pAttrValue = ((NodeAttribute *)pNode)->GetAttributeValue();
AttributeValue *pNewValue = pAttrValue->MouldIntoStroke(&Stroker, 1.0);
//****!!!!TODO - Just above, we have the chance to handle transparency better
// - we could at least scale all transparencies by passing a flat scale factor into
// the MouldIntoStroke call.
if (pNewValue != NULL)
pNewValue->Render(pRender, TRUE); // The RndRgn will delete this when it's done with
else
pNode->Render(pRender); // No change, so render the original attribute
}
}
else if (pNode->IsNodePath())
{
// Stroke the trapezoids into the output path
pOutput->ClearPath();
if (!Stroker.StrokePath(&((NodePath *)pNode)->InkPath, pOutput))
break;
pRender->SetWindingRule(NonZeroWinding);
pRender->DrawPath(pOutput, this, ShapePath);
}
// else
// TRACEUSER( "Jason", _T("\nBrush node %s not rendered\n"), pNode->GetRuntimeClass()->m_lpszClassName);
pNode = pNode->FindNextForUnclippedInkRender(pRender);
}
pRender->RestoreContext();
// --- Now check if we should break into rendering for background rendering purposes
// If the Sub-render-context is locked, then we're inside a blend or something, and it's too dangerous
// for us to store our sub-render state, so we have no choice but to render until we finish.
// BLOCK