gdi+映射模式问题;

namewchwch 2010-01-14 02:50:42
在环境中SetMapMode(MM_LOMETRIC)

用gdi+中的 graph.DrawImage(image,x,y,width,height)函数画出来 是倒着的。

我用SetMapMode(MM_TEXT)暂时更改了映射模式

SetMapMode(MM_TEXT);//暂时 更改模式

graph.DrawImage(image,x,y,width,height);//画图

SetMapMode(MM_LOMETRIC);//映射模式改回来

这样在graph.DrawImage(image,x,y,width,height);中图片的位置和 大小都发生了变化(在不同的电脑上有不同大小和位置)。
请问图和解决这个问题?
...全文
80 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
fandh 2010-01-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 c_mfc 的回复:]
MM_LOMETRIC Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.
MM_TEXT Each logical unit is mapped to one device pixel. Positive x is to the right; positive y is down.

[/Quote]
up
MSDN中有关于这个的解释
C_MFC 2010-01-28
  • 打赏
  • 举报
回复
MM_LOMETRIC Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.
MM_TEXT Each logical unit is mapped to one device pixel. Positive x is to the right; positive y is down.

19,468

社区成员

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

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