关于GraphicsPath的问题

hnb98075 2007-06-03 12:34:32
m_pathBase.m_path.Reset();
m_pathBase.m_path.AddBeziers(
&(*(m_vct_point.begin())),
m_vct_point.size() - (m_vct_point.size()-1)%3);

如上代码,其中的m_vct_point的定义:vector<PointF> m_vct_point;
为什么上面的代码画不出图但是用
PointF pts[] = {PointF(50,50),
PointF(60,20),
PointF(70,100),
PointF(80,50)};
然后
m_pathBase.m_path.Reset();
m_pathBase.m_path.AddBeziers(pts, 4);
却有可以呢?
...全文
345 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
hnb98075 2007-06-04
  • 打赏
  • 举报
回复
我这样:
vector<PointF>::iterator it;
PointF ptf[100];
int i = 0, i_temp;

for (it = m_vct_point.begin(); it != m_vct_point.end(); it++)
{
if (i < 100)
{
ptf[i].X = it->X;
ptf[i].Y = it->Y;
}
i ++;
}

if (i >= 100)
i_temp = 100;
else
i_temp = i;

m_pathBase.m_path.Reset();
m_pathBase.m_path.AddBeziers(ptf, i_temp - (i_temp - 1) % 3);

也不能画出来
hnb98075 2007-06-04
  • 打赏
  • 举报
回复
如何解决呢?
龙凤呈祥焱 2007-06-04
  • 打赏
  • 举报
回复
向量不等于数组.
hnb98075 2007-06-03
  • 打赏
  • 举报
回复
不是,是GDI+
长尾巴的悟空 2007-06-03
  • 打赏
  • 举报
回复
好像很老的库了吧,TC?
hnb98075 2007-06-03
  • 打赏
  • 举报
回复
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hnb98075 2007-06-03
  • 打赏
  • 举报
回复
.............................................................

19,469

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧