System.Drawing.Point 和 System.Drawing.PointF 有什么区别
System.Drawing.Point
和 System.Drawing.PointF
之间有什么区别。 你能举一个介于这两者之间的例子吗?
提前致谢。
What is the difference between System.Drawing.Point
and System.Drawing.PointF
.
Can you give an example between this two.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Point
使用整数坐标(X
和Y
为int
)。PointF
使用浮点(float
表示X
和Y
)。Point
uses integer coordinates (int
forX
andY
).PointF
uses floating points (float
forX
andY
).我认为 PointF 存在的部分原因是 System.Drawing.Graphics 类支持转换和抗锯齿。例如,您可以在抗锯齿模式下在离散像素之间画一条线。
看起来像
没有
PointF
这些功能将受到限制。I think
PointF
exists partly becauseSystem.Drawing.Graphics
class supports transformation and anti-aliasing. For example, you can draw a line between discrete pixelx in anti-aliasing mode.and it will look like
without
PointF
those functionalities will be limited.例如,在某些嵌入式系统中,仅支持“System.Drawing.Point”,您应该自己创建“PointF”类型。
For Example,In some embedded systems,only support "System.Drawing.Point",you should create "PointF" Type by yourself .