Graphics类画图

PageUnit属性。

ExpandedBlockStart.gif 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 ,
    }

 

 通过修改Graphics中PageUnit属性来定义何种长度来画。不单单只能画像素。

DrawLine函数用于画线。

DrawString函数用于画字。DrawString的时候可以规定在某一点开始画,或者在一个矩形区域内画。在矩形区域内可以通过StringFormat来设定水平和垂直的对齐方式。


 

搞了个打印税发票的模块,不得不鄙视天朝现在的税务制度。多让我做了那么多体力活。

转载于:https://www.cnblogs.com/liyinkan/archive/2010/10/28/1863681.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值