图片是重复的一些形状。

解决方案 »

  1.   

    简单阿,把椭圆先当做一个矩形,将图片填入,然后将椭圆区域转换为CRgn对象,调用SetClipRgn设置裁剪区就可以了。
      

  2.   

    CreatePatternBrush
    CreateDIBPatternBrush
      

  3.   

    先设置好图片画刷,然后画椭圆就可以了。         CBitmap bm;
    bm.LoadBitmap(IDR_MAINFRAME);

    // Create a pattern brush from the bitmap.
    CBrush brush;
    brush.CreatePatternBrush(&bm);

    // Select the brush into a device context, and draw.
    CBrush* pOldBrush = (CBrush*)pDC->SelectObject(&brush);
    pDC->Ellipse(CRect(50, 50, 200, 200));

    // Restore the original brush.
    pDC->SelectObject(pOldBrush);
     
      

  4.   

    pDC->BeginPath();
    pDC->Ellipse();
    pDC->EndPath();
    pDC->SelectClipPath();
    pDC->BitBlt();
      

  5.   

    聪明,用BeginPath()和 EndPath() , 在中间画个椭圆然后和图片做与操作