void C5Stars::FormGraphData(UINT nMouseState,CPoint point,CRect& rcUpdate) { PointF pt((float)point.x,(float)point.y); if(MS_LBTNDOWN == nMouseState) { m_ptary[10] = pt; m_nPtCount = 1; } else if(m_nPtCount >= 1) { m_ptary[11] = pt; m_nPtCount = 2; NormalizeTempData(); if(MS_LBTNUP == nMouseState) { m_bFinish = TRUE; m_ptarytemp.RemoveAll(); NormalizeGraphData(); InitHotData(); rcUpdate = m_rcHot; } } else { rcUpdate.SetRect(0, 0, 1, 1); } }
void CNormalPen::FormGraphData(UINT nMouseState,CPoint point) { PointF pt((float)point.x,(float)point.y); //int nCount = m_ptary.GetCount(); //if(nCount == 0) //{ // m_ptary.Add(pt); // m_nPtCount++; //} //else if(CalGapOfpoints(pt,m_ptary[nCount - 1]) > 5) //{ // m_ptary.Add(pt); // m_nPtCount++; //} if(m_noffst % 3 == 0) { m_ptary.Add(pt); m_nPtCount++; } m_noffst++; if(MS_LBTNUP == nMouseState) { m_bFinish = TRUE; InitHotData(); } }
void CDiamond::FinishGraph() { m_ptary.RemoveAt(4,2); if(4 == m_nPtCount) { m_bFinish = TRUE; InitHotData(); } return; }
void CRectangle::FinishGraph() { if(2 == m_nPtCount) { m_bFinish = TRUE; InitHotData(); } return; }
void CFlatBrushPen::FinishGraph() { if(m_nPtCount <= 0) { return; } m_bFinish = TRUE; InitHotData(); }
void CNTriangle::FinishGraph() { if(3 == m_nPtCount) { m_bFinish = TRUE; InitHotData(); } return; }
void CAngleLabel::FinishGraph() { if(3 == m_nPtCount) { m_bFinish = TRUE; InitHotData(); } return; }
void CArrow::FinishGraph() { m_ptarytemp.RemoveAll(); m_ptary.RemoveAt(7, 2); if(m_nPtCount == 7) { m_bFinish = TRUE; InitHotData(); } return; }
void C5Stars::FinishGraph() { m_ptarytemp.RemoveAll(); m_ptary.RemoveAt(10,2); if(m_nPtCount == 10) { m_bFinish = TRUE; InitHotData(); } return; }
void CNTriangle::FormGraphData(UINT nMouseState, CPoint point, CRect& rcUpdate) { PointF pt((float)point.x, (float)point.y); if(MS_LBTNDOWN == nMouseState) { m_ptary[m_nPtCount] = pt; if(m_nPtCount == 0) { m_nPtCount++; m_ptary[m_nPtCount] = pt; } } else if(m_nPtCount >= 1) { if(MS_LBTNMOUSE == nMouseState) { m_ptary[m_nPtCount] = pt; if(m_nPtCount == 2) { m_bhas3temppts = TRUE; } } else if(MS_LBTNUP == nMouseState) { if(m_nPtCount == 1) { if(pt.Equals(m_ptary[0])) { return; } } m_ptary[m_nPtCount] = pt; m_nPtCount++; if(m_nPtCount == 3) { m_bFinish = TRUE; m_bhas3temppts = FALSE; InitHotData(); rcUpdate = m_rcHot; } else { m_ptary[m_nPtCount] = pt; } } } else { rcUpdate.SetRect(0, 0, 1, 1); } }
void C6Sides::FinishGraph() { m_ptarytemp.RemoveAll(); m_ptary.RemoveAt(6,2); if(m_nPtCount == 6) { m_bFinish = TRUE; InitHotData(); } return; }
void CToolRegularRuler::InitDefaultData() { int nCenterx = GetSystemMetrics(SM_CXSCREEN) / 2; int nCentery = GetSystemMetrics(SM_CYSCREEN) / 2; m_nPtCount = 2; m_ptary[0].X = nCenterx - 400.0f; m_ptary[0].Y = nCentery - 35.0f; m_ptary[1].X = nCenterx + 400.0f; m_ptary[1].Y = nCentery + 35.0f; m_bEdit = TRUE; m_bSelected = TRUE; InitHotData(); }
void CToolRegularRuler::FinishGraph() { if(m_nPtCount == 2) { m_bFinish = TRUE; m_bSelected = FALSE; m_bEdit = FALSE; InitHotData(); } else { m_bFinish = FALSE; } return; }
void CFlatBrushPen::FormGraphData(UINT nMouseState, CPoint point, CRect& rcUpdate) { PointF pt((float)point.x, (float)point.y); if(m_nPtCount == 0) { m_ptary.Add(pt); m_nPtCount++; } else { PointF ptf = m_ptary[m_nPtCount - 1]; if(CalcGapOfpoints(pt, ptf) >= 3) { m_ptary.Add(pt); m_nPtCount++; } } if(m_nPtCount >= 2 && !m_bFinish) { CPoint ptLT((int)m_ptary[m_nPtCount - 1].X, (int)m_ptary[m_nPtCount - 1].Y); CPoint ptRB((int)m_ptary[m_nPtCount - 2].X, (int)m_ptary[m_nPtCount - 2].Y); rcUpdate.SetRect(ptLT, ptRB); rcUpdate.NormalizeRect(); rcUpdate.InflateRect(3 * m_nWidth, 3 * m_nWidth); } if(MS_LBTNUP == nMouseState) { if(( m_nPtCount <= 1) || ( m_nPtCount <= 2 && CalcGapOfpoints(m_ptary[0],m_ptary[1]) <= 3)) { m_bDataInvalid = TRUE; } else { m_bFinish = TRUE; InitHotData(); rcUpdate = m_rcHot; } } }
void CRectangle::FormGraphData(UINT nMouseState,CPoint point) { PointF pt((float)point.x,(float)point.y); if(MS_LBTNDOWN == nMouseState) { m_ptary[0] = pt; m_nPtCount = 1; } else { m_ptary[1] = pt; m_nPtCount = 2; if(MS_LBTNUP == nMouseState) { m_bFinish = TRUE; NormalizeData(); InitHotData(); } } }
void CAngleLabel::StretchGraph(CPoint point) { if(MT_LT == m_ModifyType) { m_ptary[0].X = (float)point.x; m_ptary[0].Y = (float)point.y; } else if(MT_RB == m_ModifyType) { m_ptary[1].X = (float)point.x; m_ptary[1].Y = (float)point.y; } else if(MT_RC == m_ModifyType) { m_ptary[2].X = (float)point.x; m_ptary[2].Y = (float)point.y; } InitHotData(); }
void CTransparentPen::FinishGraph() { m_bFinish = TRUE; InitHotData(); return; }
void CNormalPen::FinishGraph() { m_bFinish = TRUE; InitHotData(); return; }
void CRectangle::FinishGraph() { m_bFinish = TRUE; InitHotData(); return; }