C#中的像素到点转换 [英] Pixel to point conversion in c#

查看:547
本文介绍了C#中的像素到点转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在c#中计算像素到点的转换.

How we calculate Pixel to point conversion in c#.

推荐答案

这是为您提供的解决方案:
如何将像素转换为点? [ ^ ]
Here is a solution for you :
How To Convert Pixel To Point ?[^]


尝试:
float points;
float pixels = 100;
Graphics g = CreateGraphics();
points = pixels * 72 / g.DpiX;
g.Dispose();


这篇关于C#中的像素到点转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆