示例#1
0
/**
* Draw the head top drawable
* \param graphics Graphics context to draw on
*/
void CHeadTop::Draw(Gdiplus::Graphics *graphics)
{
	/// Calls the original verison
	CImageDrawable::Draw(graphics);

	// Draws the left and right eyebrow
	DrawEyebrow(mPoints[0], mPoints[1], graphics);
	DrawEyebrow(mPoints[2], mPoints[3], graphics);

	// Draws the left and right eye
	DrawEye(mPoints[4], graphics);
	DrawEye(mPoints[5], graphics);

}
示例#2
0
void CSmiley::Draw(const TRect& aRect) const
	{
	CWindowGc& gc = SystemGc();
	if (IsFocused())
		{
		gc.SetPenColor(KRgbBlack);
		}
	else
		{
		gc.SetPenColor(KRgbWhite);
		}
	gc.SetBrushColor(KRgbWhite);
	gc.Clear(Rect());
	gc.DrawRect(Rect());

	gc.SetClippingRect(aRect);

	DrawFace(gc);
	DrawEyes(gc);
	DrawEyebrow(gc, IsSmiling());
	DrawMouth(gc, IsSmiling());
	}