我无法得到一个简单的答案。我有像素坐标,我想在这些坐标的(横向)页面中打印图像。
在我的印刷活动中,我会:
Dim mypoint As New PointF(1, 1192)
e.Graphics.DrawImage(My.Resources.littleSquare, mypoint)
这显然不起作用:我指定了像素,但驱动程序需要英寸(?)还是什么?
试图:e.Graphics.PageUnit = GraphicsUnit.Inch
没有运气。
我想要一种转换方法,例如:
Dim mypoint As New PointF(convertPixelsIntoInches(1), convertPixelsIntoInches(1192))
e.Graphics.DrawImage(My.Resources.littleSquare, mypoint)
Private Function convertPixelsIntoInches(ByVal pixels As Integer) As Single
Return ??
End Function
有什么提示吗?谢谢。