Esempio n. 1
0
void CQTTDemoView::InitSillyObjects(void)
{
	CString s(_T("Test"));
	CString sFont(_T("Georgia"));
	FontFamily ff(sFont.AllocSysString());
	StringFormat sf;
	Point p(200, 200);

	MakeStarPath(m_Paths[PATH_MULTI_STAR], 7, 40, 120);
	//Matrix mat;
	m_Matrixs[PATH_MULTI_STAR] = new Matrix();
	//mat.Translate(700, 150);
	m_Matrixs[PATH_MULTI_STAR]->Translate(700, 150);
	m_Paths[PATH_MULTI_STAR].Transform(m_Matrixs[PATH_MULTI_STAR]);

	MakeSmiley(m_Paths[PATH_SMILE]);	
	//mat.Reset();
	m_Matrixs[PATH_SMILE] = new Matrix();
	//mat.Translate(400, 300);
	m_Matrixs[PATH_SMILE]->Translate(400, 300);
	//mat.Scale(0.2f, 0.2f);
	m_Matrixs[PATH_SMILE]->Scale(0.2f, 0.2f);
	//mat.Rotate(- 15.0f);
	m_Matrixs[PATH_SMILE]->Rotate(- 15.0f);
	m_Paths[PATH_SMILE].Transform(m_Matrixs[PATH_SMILE]);

	Rect rc2(120, 80, 160, 65);
	m_Matrixs[PATH_RECTANGLE] = new Matrix();
	m_Paths[PATH_RECTANGLE].Reset();
	m_Paths[PATH_RECTANGLE].AddRectangle(rc2);

	m_Matrixs[PATH_TEXT] = new Matrix();
	m_Paths[PATH_TEXT].Reset();
	m_Paths[PATH_TEXT].AddString(s.AllocSysString(), s.GetLength(), &ff, FontStyleBold, 100.0F, p, & sf);

	Rect rc4(420, -240, 120, 265);	
	m_Paths[PATH_ELLIPSE].Reset();	
	m_Paths[PATH_ELLIPSE].AddEllipse(rc4);	
	//mat.Reset();
	m_Matrixs[PATH_ELLIPSE] = new Matrix();
	//mat.Rotate(30.0f);
	m_Matrixs[PATH_ELLIPSE]->Rotate(30.0f);
	m_Paths[PATH_ELLIPSE].Transform(m_Matrixs[PATH_ELLIPSE]);

	MakeStarPath(m_Paths[PATH_STAR], 5, 12, 60);
	//mat.Reset();
	m_Matrixs[PATH_STAR] = new Matrix();
	//mat.Translate(224, 320);
	m_Matrixs[PATH_STAR]->Translate(224, 320);
	m_Paths[PATH_STAR].Transform(m_Matrixs[PATH_STAR]);

	MakeImagePath(m_Paths[PATH_IMAGE]);
	m_Matrixs[PATH_IMAGE] = new Matrix();	
	m_Matrixs[PATH_IMAGE]->Translate(0,0);
	//m_Matrixs[PATH_IMAGE]->Translate(106/2,76/2);
	//m_Matrixs[PATH_IMAGE]->Translate(34,59);
}
Esempio n. 2
0
BOOL CDecodeIMDoc::DecodeMessage(CString message)
{
	ofstream f(m_sTempFileName, ios::out|ios::trunc);
	if ( f == NULL ||message.GetLength()==0)
		return false;

	m_sLastMessage = message;
	m_bHasDecodeContent = true;

	f << sHTML << "<head>" << StyleList << "</head>";
	f << sBody << sFont(FONT_COURIER) << message << eFont << Break << endl;

	DecodeISDNMessage(f,message);

	f << eBody << eHTML << endl;

	f.close();

	UpdateAllViews(NULL);
	return true;
}