Guidance
指路人
g.yi.org
software / rapidq / Examples / Graphics & Animation / barcode / barcode / Codabar / MAKEBMP.INC

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE SUB makebmp (barcode AS STRING,tekst AS STRING,BLineWidth AS INTEGER,filename AS STRING)

     DIM barcode AS STRING
     DIM tekst AS STRING
     DIM BLineWidth AS INTEGER
     DIM filename AS STRING

'--------------------------------------------------------------
     SUB makebmp (barcode AS STRING,tekst AS STRING,BLineWidth AS INTEGER,filename AS STRING)

      DIM bmp AS QBITMAP
      DIM lang AS INTEGER
      DIM breedte AS INTEGER
      DIM BCount AS INTEGER
      DIM BXPOS AS INTEGER
      DIM TEKSTPOS AS INTEGER
      DIM Bcolor AS INTEGER

      breedte=LEN(barcode)*blinewidth
      lang=LEN(barcode)

      BColor=0
      bmp.Monochrome= 1
      bmp.Width=breedte
      'breedte
      bmp.Height=70
      BXPos=1
      FOR bcount= 1 TO lang

       IF MID$(barcode,BCount,1)="1" THEN bcolor=0
       IF MID$(barcode,BCount,1)="0" THEN bcolor=16777215

       bmp.FillRect (BXPos*1 , 1,(BXPos+BLineWidth) ,50 ,BColor)
       BXPos=BXPos+BLineWidth

      NEXT BCount

      tekstpos=((breedte)-(LEN(tekst)*12))/2

      bcolor=16777215
      bmp.Font.size=12
      bmp.Font.AddStyles(fsBold, fsItalic)
      bmp.TextOut (tekstpos,52,tekst, 0,16777215 )
      bmp.SaveToFile(filename)


     END SUB
'----------------------------------------------------------------------------------
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-12-13  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:58:32