| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 
 | void CDlgAttributsGraphiques::OnevEditLxwctrlgp(long out_iClass, long out_iThreshold) 
{
	if(m_pGesGraphicProperties == NULL) return;
 
	int iGP = m_lxwCtrlListeGP.GetItemSelected(0);
	if (iGP == -1) return;
 
	lxwGraphicProperties *pGP = m_pGesGraphicProperties->GetGraphicProperties(iGP);
	int iType = pGP->GetGraphicPropertiesType();
 
	if (iType == lxwGraphicProperties::elxwGRAPHICTYPEPIE) {
		CDlgAttributsSecteurs Dlg0;
		HPEN hPen;
		LOGPEN LogPen;
		int nSector, cx, cy;
 
		if (pGP->GetPie(out_iClass, out_iThreshold, &nSector, &hPen, &cx, &cy)) {
			Dlg0.SetCheckContours(FALSE);
			if (hPen != NULL) {
				GetObject(hPen, sizeof(LOGPEN), &LogPen);
				Dlg0.SetCheckContours(TRUE);
				Dlg0.SetColorContours(LogPen.lopnColor);
				Dlg0.SetTailleContours(LogPen.lopnWidth.x);
			}
			Dlg0.SetTailleMax(cx);
			Dlg0.SetTailleMin(cx);
		}
		if(Dlg0.DoModal() == IDOK) {
			int nSeuils = pGP->GetNbThreshold(out_iClass);
			int iPenWidth = Dlg0.GetTailleContours();
			ULONG lPenColor = Dlg0.GetColorContours();
			if (!Dlg0.GetCheckContours()) {
				iPenWidth = 0;
				lPenColor = 0;
			}
			cx = cy = Dlg0.GetTailleMax();
			COLORREF lstlBrushColor[6];
			lstlBrushColor[0] = RGB(0, 255, 0);
			lstlBrushColor[1] = RGB(0, 0, 255);
			lstlBrushColor[2] = RGB(255, 255, 0);
			lstlBrushColor[3] = RGB(255, 0, 255);
			lstlBrushColor[4] = RGB(128, 64, 64);
			lstlBrushColor[5] = RGB(255, 128, 0);
			int lstiValues[6];
			lstiValues[0] = 0;
			lstiValues[1] = 0;
			lstiValues[2] = 0;
			lstiValues[3] = 0;
			lstiValues[4] = 0;
			lstiValues[5] = 0;
			if (nSeuils > 0) {
				pGP->SetPieDraw(out_iClass, out_iThreshold, cx, cy, 6, lstlBrushColor, iPenWidth, lPenColor);
			}
			else {
				pGP->AddPie(out_iClass, out_iThreshold, cx, cy, 6, lstlBrushColor, lstiValues, iPenWidth, lPenColor);
			}
		}
	}
} |