C#中使用GDI+绘图,为了实现异或绘图,调用API的Polydraw,想把用GDI+绘的Path,用异或方式绘出,但Polydraw的参数和值都跟GDI+的path不一 我很想帮助你的,可那次,你也知道的思归也来了,可是还是没则!不过你为什么不从GDI+本身来着手呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public bool W32PolyDraw(GraphicsPath gPath) { if(gPath != null) { pf = (PointF[])gPath.PathPoints.Clone(); bg = gPath.PathTypes; nCount = gPath.PointCount; if(nCount > 1000) { MessageBox.Show("性能报警!一共点数 : " + nCount.ToString()); } p = new Point[nCount]; b = new byte[nCount]; for(int i = 0; i < nCount ; i++) { p[i] = new Point((int)pf[i].X,(int)pf[i].Y); if(bg[i] == 3) { b[i] = 0x04; } else { b[i] = 0x02; } } b[0] = 0x06; if(b[nCount - 2] == 0x04) { b[nCount - 1] = 0x04; } else { b[nCount - 1] = 0x03; } PolyDraw(hdc, p, b, nCount); } return true; }再帮我看看,我自己想转换的,比较准确了,但在直线我弧线交替时还有一点点不太正确,如何能更准确。 预画的时候用GDI32支持的类型,精确不精确根本无所谓,就算你用浮点型来预画也不一定准确,因为象素没有浮点型的。确定的时候把GDI+支持的类型传给GDI+的函数。一句话:为GDI32和GDI+各准备一个类型。(GDI+不直接支持XOR真是非常不爽!) 窗体的DOCK的属性 关于检查拼音问题求助 需要检查是否单拼、双拼、三拼、四拼 求调查问卷思路 crystal report 設計問題,高分求救..... 用c#显示硬件配置信息 加入參數(sqldataadapter.selectcommand) Winform 的DataGridView的column怎么做成多层的. 一个问了很多遍的问题,但是我查过了,好像都没有解决 c#中 Invalidate函数使用问题 寻找技术合伙人 关于硬盘序列号,高手请留步啊. C#中的枚举类型的一个问题:
{
if(gPath != null)
{
pf = (PointF[])gPath.PathPoints.Clone();
bg = gPath.PathTypes;
nCount = gPath.PointCount; if(nCount > 1000)
{
MessageBox.Show("性能报警!一共点数 : " + nCount.ToString());
} p = new Point[nCount];
b = new byte[nCount]; for(int i = 0; i < nCount ; i++)
{
p[i] = new Point((int)pf[i].X,(int)pf[i].Y); if(bg[i] == 3)
{
b[i] = 0x04;
}
else
{
b[i] = 0x02;
}
}
b[0] = 0x06;
if(b[nCount - 2] == 0x04)
{
b[nCount - 1] = 0x04;
}
else
{
b[nCount - 1] = 0x03;
}
PolyDraw(hdc, p, b, nCount);
}
return true;
}再帮我看看,我自己想转换的,比较准确了,但在直线我弧线交替时还有一点点不太正确,如何能更准确。
(GDI+不直接支持XOR真是非常不爽!)