2007년 4월 8일 일요일

GDI+ paint with pattern brush

void CGdiplusDemoView::OnDraw(CDC* pDC)
{
    Graphics g(pDC->m_hDC);

    for ( int i = 0; i < HatchStyleTotal; i++ ) {
        HatchBrush brush((Gdiplus::HatchStyle)i,
            Color(255, 0, 0, 0), Color(255, 255, 255, 0));
        g.FillRectangle(&brush, 20+(i%7)*90, 20+(i/7)*60, 80, 50);
    }
}


댓글 없음: