楼上我使用GDI+编译程序时候报出一大堆错误,好像跟STL有冲突。 d:\my program\code common\gdi+\gdiplusflat.h(267) : error C2955: 'iterator' : use of class template requires template argument list c:\program files\microsoft visual studio\vc98\include\utility(71) : see declaration of 'iterator' d:\my program\code common\gdi+\gdiplusflat.h(270) : error C2955: 'iterator' : use of class template requires template argument list c:\program files\microsoft visual studio\vc98\include\utility(71) : see declaration of 'iterator'
。
都是 using namespace 惹的祸,谢谢楼上的,另外我还顺便学了GDI+,不错,以后打算不用GDI了……
pDC->Arc(100, 300, 300, 400, 170, 350, 150, 390);
GraphicsPath path;
path.AddArc(0, 0, 100, 100, 0, 180);//添加一个圆弧 Pen pen(Color(0, 0, 0));//创建宽度为1的画笔
Point pt(50, 100);//指定要判断的点
if (path.IsOutlineVisible(pt, &pen) && !path.IsVisible(pt)) //如果在圆弧上
{
MessageBox("A1");
}
GraphicsPath path;
path.AddArc(0, 0, 100, 100, 0, 180);//添加一个圆弧 Pen pen(Color(0, 0, 0));//创建宽度为1的画笔
Point pt(50, 100);//指定要判断的点
if (path.IsOutlineVisible(pt, &pen) && !path.IsVisible(pt)) //如果在圆弧上
{
MessageBox("A1");
}
d:\my program\code common\gdi+\gdiplusflat.h(267) : error C2955: 'iterator' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\include\utility(71) : see declaration of 'iterator'
d:\my program\code common\gdi+\gdiplusflat.h(270) : error C2955: 'iterator' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\include\utility(71) : see declaration of 'iterator'
。
那就是我是用ARC绘制弧形的,可是GDI+的DRAWARC绘制方法跟GDI的不一样,最后的参数是弧度,我搞不明白GDI的弧线开始点跟结束点该怎样个换算关系,谢谢。