Ejemplo n.º 1
0
void PngOutlineText::TextOutline(
	Gdiplus::Color clrText, 
	Gdiplus::Color clrOutline, 
	int nThickness)
{
	TextOutlineStrategy* pStrat = new TextOutlineStrategy();
	pStrat->Init(clrText,clrOutline,nThickness);

	if(m_pTextStrategy)
		delete m_pTextStrategy;

	m_pTextStrategy = pStrat;

	TextOutlineStrategy* pStrat2 = new TextOutlineStrategy();
	pStrat2->Init(
		Gdiplus::Color(clrText.GetAlpha(),255,255,255),
		Gdiplus::Color(clrOutline.GetAlpha(),255,255,255),
		nThickness);

	if(m_pTextStrategyMask)
		delete m_pTextStrategyMask;

	m_pTextStrategyMask = pStrat2;

}
Ejemplo n.º 2
0
void OutlineText::TextOutline(
	Gdiplus::Brush* pbrushText, 
	Gdiplus::Color clrOutline, 
	int nThickness)
{
	TextOutlineStrategy* pStrat = new TextOutlineStrategy();
	pStrat->Init(pbrushText,clrOutline,nThickness);

	if(m_pTextStrategy)
		delete m_pTextStrategy;

	m_pTextStrategy = pStrat;
}
Ejemplo n.º 3
0
void OutlineText::Shadow(
	Gdiplus::Color color, 
	int nThickness,
	Gdiplus::Point ptOffset)
{
	TextOutlineStrategy* pStrat = new TextOutlineStrategy();
	pStrat->Init(Gdiplus::Color(0,0,0,0),color,nThickness);

	m_clrShadow = color;

	if(m_pFontBodyShadow)
		delete m_pFontBodyShadow;

	TextOutlineStrategy* pFontBodyShadow = new TextOutlineStrategy();
	pFontBodyShadow->Init(Gdiplus::Color(255,255,255),Gdiplus::Color(0,0,0,0),0);
	m_pFontBodyShadow = pFontBodyShadow;

	if(m_pShadowStrategy)
		delete m_pShadowStrategy;

	m_ptShadowOffset = ptOffset;
	m_pShadowStrategy = pStrat;
	m_bDiffuseShadow = false;
}