void PngOutlineText::TextGlow(
	Gdiplus::Color clrText, 
	Gdiplus::Color clrOutline, 
	int nThickness)
{
	TextGlowStrategy* pStrat = new TextGlowStrategy();
	pStrat->Init(clrText,clrOutline,nThickness);

	if(m_pTextStrategy)
		delete m_pTextStrategy;

	m_pTextStrategy = pStrat;

	TextGlowStrategy* pStrat2 = new TextGlowStrategy();
	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;

}
Exemple #2
0
void OutlineText::TextGlow(
	Gdiplus::Brush* pbrushText, 
	Gdiplus::Color clrOutline, 
	int nThickness)
{
	TextGlowStrategy* pStrat = new TextGlowStrategy();
	pStrat->Init(pbrushText,clrOutline,nThickness);

	if(m_pTextStrategy)
		delete m_pTextStrategy;

	m_pTextStrategy = pStrat;
}