Пример #1
0
void CCAttrMap::TransformForBrush(TransformBase& Trans)
{
	CCRuntimeClass	   *pType;
	void			   *pVal;
	for( iterator Pos = GetStartPosition(); Pos != GetEndPosition(); )
	{
		GetNextAssoc(Pos,pType,pVal);
		if (pVal != NULL)
		{
			NodeAttribute* pNodeAttr = (NodeAttribute *)pVal;
			
			// check that we are not about to set line width to zero
			if( pNodeAttr->IsALineWidthAttr() && Trans.TransLines != FALSE )
			{
				double Test =  Trans.GetScalar().MakeDouble() * (double)((AttrLineWidth*)pNodeAttr)->Value.LineWidth;
		//		TRACEUSER( "Diccon", _T("Scale line width by %f\n"), Test);
				if (Test <= 1.0)
				{
				//	TRACEUSER( "Diccon", _T("Setting line width scaling OFF\n"));
					Trans.TransLines = FALSE;
				}
			}

			if (pNodeAttr->NeedsToRenderAtEachBrushStroke())
				pNodeAttr->Transform(Trans);
		}
	}
}
Пример #2
0
void CCAttrMap::TransformBrushFills(TransformBase& Trans)
{
	CCRuntimeClass	   *pType;
	void			   *pVal;
	for( iterator Pos = GetStartPosition(); Pos != GetEndPosition(); )
	{
		GetNextAssoc(Pos,pType,pVal);
		if (pVal != NULL)
		{
			NodeAttribute* pNodeAttr = (NodeAttribute *)pVal;
			
			// check that we are not about to set line width to zero
			if( pNodeAttr->IsALineWidthAttr() && Trans.TransLines != FALSE )
			{
				INT32 Test = labs( INT32(Trans.GetScalar().MakeDouble() * ((AttrLineWidth*)pNodeAttr)->Value.LineWidth) );		
				if (Test <= 10)
					Trans.TransLines = FALSE;
			}

			if (!pNodeAttr->NeedsToRenderAtEachBrushStroke())
				pNodeAttr->Transform(Trans);
		}
	}


}
Пример #3
0
void CCAttrMap::Transform(TransformBase& Trans)
{
	CCRuntimeClass	   *pType;
	void			   *pVal;
	for( iterator Pos = GetStartPosition(); Pos != GetEndPosition(); )
	{
		GetNextAssoc(Pos,pType,pVal);
		if (pVal != NULL)
		{
			NodeAttribute* pNodeAttr = (NodeAttribute *)pVal;
			pNodeAttr->Transform(Trans);
		}
	}
}