void CLTriangle::DrawPreView(Graphics& graph, Pen& penDraw)
{
	PointF pt[3];
	pt[0] = m_ptary[0];
	pt[1] = m_ptary[1];
	pt[2].X = pt[0].X;
	pt[2].Y = pt[1].Y;

	graph.DrawPolygon(&penDraw,pt,3);
}
Beispiel #2
0
void DrawPolygon(const Point* points, IN INT count, HDC hdcPaint, DashStyle dashStyle, Color clr, REAL width)
{
    Pen*         myPen;
    Graphics*    myGraphics;
    myPen = new Pen(clr, width);
    if(myPen)
    {
        myPen->SetDashStyle(dashStyle);
        myGraphics = new Graphics(hdcPaint);
        if(myGraphics)
        {
            myGraphics->DrawPolygon(myPen, points, count);
            delete myGraphics;
        }
        delete myPen;
    }
}