예제 #1
0
void C_BranchProperties::InitJoin()
{
	static intarray chk;
	static intarray unchk;
	static intarray greyed;
	static stringarray tips;
	static intarray values;

	if (0 == tips.GetLength()) {

		tips.ReDim(3);
		chk.ReDim(3);
		unchk.ReDim(3);
		greyed.ReDim(3);
		values.ReDim(3);

		*tips[0] = _T("The branch is drawn with a rounded join");
		*tips[1] = _T("The branch is drawn with a bevelled join");
		*tips[2] = _T("The branch is drawn with a mitred join");

		*values[0] = eJoinRound;
		*values[1] = eJoinBevel;
		*values[2] = eJoinMitre;

		for (int n = 0; n < chk.GetLength(); n++) {

			*chk[n] = reinterpret_cast<int>(s_hJoinSel[n]->GetHandle());
			*unchk[n] = reinterpret_cast<int>(s_hJoinUnsel[n]->GetHandle());
			*greyed[n] = reinterpret_cast<int>(s_hJoinGrey[n]->GetHandle());
		}
	}

	m_penJoin.Init(
			eMetafile,
			String(_T("Pen Join")),
			unchk,
			chk,
			greyed,
			tips,
			values
		);
}
예제 #2
0
void C_BranchProperties::InitEnds()
{
	static intarray chk;
	static intarray unchk;
	static intarray greyed;
	static stringarray tips;
	static intarray values;

	if (0 == tips.GetLength()) {

		tips.ReDim(3);
		chk.ReDim(3);
		unchk.ReDim(3);
		greyed.ReDim(3);
		values.ReDim(3);

		*tips[0] = _T("The branch is drawn with a rounded end");
		*tips[1] = _T("The branch is drawn with a square end");
		*tips[2] = _T("The branch is drawn with a flat end");

		*values[0] = eEndRound;
		*values[1] = eEndSquare;
		*values[2] = eEndFlat;

		for (int n = 0; n < chk.GetLength(); n++) {

			*chk[n] = reinterpret_cast<int>(s_hEndSel[n]->GetHandle());
			*unchk[n] = reinterpret_cast<int>(s_hEndUnsel[n]->GetHandle());
			*greyed[n] = reinterpret_cast<int>(s_hEndGrey[n]->GetHandle());
		}
	}

	m_penEnd.Init(
			eMetafile,
			String(_T("Pen End")),
			unchk,
			chk,
			greyed,
			tips,
			values
		);
}