象word那样画极细的线,比如0.5磅 0.25磅。一般情况线条宽度最小也为1象素.但打印出来的时候还是很粗

jetzhang 2006-08-11 06:36:34
一般情况线条宽度最小也为1象素.但打印出来的时候还是很粗,怎么让它更细一些呢。word都做到了,0.5磅 0.25磅都比1象素要细。可怎么做到呢?请高手赐教,感激不尽!
...全文
1225 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
qingfeng9932 2006-09-01
  • 打赏
  • 举报
回复
去看看这篇文章吧
http://dev.yesky.com/121/2018121.shtml
关于坐标变换和坐标映射介绍的简明易懂
Elysium 2006-08-22
  • 打赏
  • 举报
回复
void CMyView::OnPrint(CDC* pDC)
{
CRect rectClient;
GetClientRect(rectClient);

pDC->SetMapMode(MM_TWIPS);
pDC->SetViewportOrg(rectClient.right /2 , rectClient.bottom / 2);
......
}
cenchure 2006-08-22
  • 打赏
  • 举报
回复
楼上说的对
buggycode 2006-08-22
  • 打赏
  • 举报
回复
问题是打印和显示的DPI是不同的。先搞明白这个再自己设计逻辑。
DollfaceYY 2006-08-21
  • 打赏
  • 举报
回复
SetMapMode(hdc, MM_HIENGLISH);

/* x is to the right, y is to up(!!!). The Logical unit is 0.001 inch. So, if the width of line is 1, your will see the width of line is 0.001 inch on any device.

P.S.
1). There is no printer in my office so that I'm not sure it can work. (It should be fine :-)
2). U can know more in the Chapter 5 (Basic Drawing) from <<Programming Windows, 5TH>>. */
jetzhang 2006-08-12
  • 打赏
  • 举报
回复
有没有相关的代码,谢谢了!
Elysium 2006-08-11
  • 打赏
  • 举报
回复
1/1440英寸
1个twip相当于1/20磅
Elysium 2006-08-11
  • 打赏
  • 举报
回复
转换映射模式
使用固定比例模式MM_TWIPS
VirgoCeleste 2006-08-11
  • 打赏
  • 举报
回复
绘图的映象模式用设备单位吧,我没有试过,只是觉得应该可以

19,468

社区成员

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

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