예제 #1
0
// ****************************************************************************
//
// Function Name:			RPsd3RuledLineGraphic::Render()
//
// Description:			Draws the RuledLine
//
// Returns:					Nothing
//
// Exceptions:				None
//
// ****************************************************************************
void RPsd3RuledLineGraphic::Render(RDrawingSurface& rDrawingSurface, const RRealSize& rSize, const R2dTransform& rTransform, const RIntRect& rRender, const RColor& rMonoColor, BOOLEAN)
{
	R2dTransform rLineTransform = rTransform;
	RRealSize rLineSize = rSize;
	if (!m_fHorizontal)
	{
		rLineSize.m_dx = rSize.m_dy;
		rLineSize.m_dy = rSize.m_dx;
		rLineTransform.PreRotateAboutOrigin(::DegreesToRadians(-90.0));
		rLineTransform.PreTranslate(0.0, -rLineSize.m_dy);		
	}

	Render(&rDrawingSurface, NULL, rLineSize, rLineTransform, rRender, rMonoColor);
}
예제 #2
0
// ****************************************************************************
//
// Function Name:		RPsd3RuledLineGraphic::GetOutlinePath( )
//
// Description:		Compute and return the path the encompases the path of this graphic
//
// Returns:				nothing
//
// Exceptions:			None
//
// ****************************************************************************
//
BOOLEAN RPsd3RuledLineGraphic::GetOutlinePath( RPath& path, const RRealSize& size, const R2dTransform& transform )
{	
	R2dTransform rLineTransform = transform;
	RRealSize rLineSize = size;
	if (!m_fHorizontal)
	{
		rLineSize.m_dx = size.m_dy;
		rLineSize.m_dy = size.m_dx;
		rLineTransform.PreRotateAboutOrigin(::DegreesToRadians(-90.0));
		rLineTransform.PreTranslate(0.0, -rLineSize.m_dy);		
	}

	Render( NULL, &path, rLineSize, rLineTransform, RIntRect(0,0,0,0), RColor(kBlack) );
	return TRUE;
}