Graphics类画图
PageUnit属性。
GraphicsUnit
public enum GraphicsUnit
{
// Summary:
// Specifies the world coordinate system unit as the unit of measure.
World = 0,
//
// Summary:
// Specifies the unit of measure of the display device. Typically pixels for
// video displays, and 1/100 inch for printers.
Display = 1,
//
// Summary:
// Specifies a device pixel as the unit of measure.
Pixel = 2,
//
// Summary:
// Specifies a printer's point (1/72 inch) as the unit of measure.
Point = 3,
//
// Summary:
// Specifies the inch as the unit of measure.
Inch = 4,
//
// Summary:
// Specifies the document unit (1/300 inch) as the unit of measure.
Document = 5,
//
// Summary:
// Specifies the millimeter as the unit of measure.
Millimeter = 6,
}
{
// Summary:
// Specifies the world coordinate system unit as the unit of measure.
World = 0,
//
// Summary:
// Specifies the unit of measure of the display device. Typically pixels for
// video displays, and 1/100 inch for printers.
Display = 1,
//
// Summary:
// Specifies a device pixel as the unit of measure.
Pixel = 2,
//
// Summary:
// Specifies a printer's point (1/72 inch) as the unit of measure.
Point = 3,
//
// Summary:
// Specifies the inch as the unit of measure.
Inch = 4,
//
// Summary:
// Specifies the document unit (1/300 inch) as the unit of measure.
Document = 5,
//
// Summary:
// Specifies the millimeter as the unit of measure.
Millimeter = 6,
}
通过修改Graphics中PageUnit属性来定义何种长度来画。不单单只能画像素。
DrawLine函数用于画线。
DrawString函数用于画字。DrawString的时候可以规定在某一点开始画,或者在一个矩形区域内画。在矩形区域内可以通过StringFormat来设定水平和垂直的对齐方式。
搞了个打印税发票的模块,不得不鄙视天朝现在的税务制度。多让我做了那么多体力活。
---0101-0101-01-0111-0110-110-10011-------
如果,人生可以编码 ……