- 2023-05-16GDI-ExtSelectClipRgn将指定区域与当前剪辑区域组合在一起
HRGNhrgn1;HRGNhrgn;HRGNhrgn2;HRGNhrgn3;HDChdc;HBRUSHhbr;voidCGdiPlusDlg::OnBnClickedButton10(){hdc=::GetDC(m_hWnd);hrgn1=CreateRectRgn(10,10,200,200);//创建矩形区域intn=SelectClipRgn(hdc,hrgn1);//选择剪切区域
- 2023-05-15GDI-PaintRgn用HDC中的当前画刷填充区域
HRGNhrgn1=CreateRectRgn(10,10,100,100);//创建矩形区域HRGNhrgn2=CreateEllipticRgn(150,150,250,250);//创建椭圆区域HRGNhrgn=CreateRectRgn(0,0,0,0);intn1=::CombineRgn(hrgn,hrgn1,hrgn2,RGN_OR);//将两个区域组合为
- 2023-05-15GDI-FillRgn用画刷填充区域
HRGNhrgn1=CreateRectRgn(10,10,100,100);//创建矩形区域HRGNhrgn2=CreateEllipticRgn(150,150,250,250);//创建椭圆区域HRGNhrgn=CreateRectRgn(0,0,0,0);intn1=::CombineRgn(hrgn,hrgn1,hrgn2,RGN_OR);//将两个区域组
- 2023-05-15GDI-CombineRgn将两个区域组合为一个新区域
HRGNhrgn1=CreateRectRgn(10,10,100,100);//创建矩形区域HRGNhrgn2=CreateEllipticRgn(150,150,250,250);//创建椭圆区域HRGNhrgn=CreateRectRgn(0,0,0,0);intn1=::CombineRgn(hrgn,hrgn1,hrgn2,RGN_OR);//将两个区域组合为