Guidance
指路人
g.yi.org
software / rapidq / Examples / Graphics & Animation / Save QCanvas.bas

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

  
'From:  "John Graves" <laddie@b...> Sat Sep 14, 2002  12:44 pm
'Subject:  Save qcanvas to file
'use source as the source rect and destination as the
'destination rect. destination meaning bitmap.

'Cut and paste the Dim Statements above your form create statements and cut
'the sub into your sub

     DIM Bitmap AS QBITMAP
     DIM Source AS QRECT
     DIM Destination AS QRECT

     SUB Saveit
      Bitmap.Height=Canvas.Height
      Bitmap.Width=Canvas.Width
      WITH Destination
       .Top = 0
       .Left = 0
       .Right = .Left+Bitmap.Width
       .Bottom = .Top+Bitmap.Height
      END WITH
      WITH Source
       .Top = 0
       .Left = 0
       .Right = Canvas.Width
       .Bottom = Canvas.Height
      END WITH
      Bitmap.CopyRect(Destination,Canvas, Source)
      Bitmap.SaveToFile "whatever.bmp"
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-10-12  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-09-15 10:00:50