Guidance
指路人
g.yi.org
software / RapidQ / RQ Doc / html / qbitmap.html

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

  
Appendix A: QBITMAP
Rapid-Q Documentation by William Yu (c)1999 Appendix A: QBITMAP


QBITMAP Component

QBitmap is a non-visible component, used to store/retrieve BMP images.

QBitmap Properties
FieldTypeR/WDefaultSupport





BMPSTRINGRWW
Use BMP to assign a new bitmap file, or to store BMP in the image cache.
Examples:
DIM Bitmap AS QBITMAP
Bitmap.BMP = "whatever.bmp"
BMPHandleRESOURCEWW
CopyModeINTEGERRWcmBlacknessW
EmptyINTEGERRW
FontQFONTWW
HandleINTEGERRWW
HeightINTEGERRWWG
MonochromeINTEGERRWW
Pixel2D ARRAY of INTEGERRWWG
PixelFormatINTEGERRWpfDeviceW
TopINTEGERRWWG
TransparentINTEGERRWFalseW
TransparentColorINTEGERRWW
TransparentModeINTEGERRW0W
WidthINTEGERRWWG


QBitmap Methods
MethodTypeDescriptionParamsSupport





CircleSUB (x1%, y1%, x2%, y2%, c%, fill%)Draw & Fill Circle6WG
CopyRectSUB (D, Image, S)D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap3W
Example (copies QIMAGE to bitmap at 10,10):
DIM Destination AS QRECT
DIM Source AS QRECT
DIM Image AS QIMAGE
DIM Bitmap AS QBITMAP
Image.BMP = "whatever.bmp"

WITH Destination
.Top = 10
.Left = 10
.Right = .Left+Image.Width
.Bottom = .Top+Image.Height
END WITH
WITH Source
.Top = 0
.Left = 0
.Right = Image.Width
.Bottom = Image.Height
END WITH
Bitmap.CopyRect(Destination, Image, Source)
DrawSUB (x%, y%, BMP)Draw Bitmap on Canvas3WG
FillRectSUB (x1%, y1%, x2%, y2%, c%)Draws & Fills a rectangle5WG
LineSUB (x1%, y1%, x2%, y2%, c%)Draws a line5WG
LoadFromFileSUB (FileName$)Load BMP from a file1W
LoadFromStreamSUB (Stream)Load BMP from a stream1W
PaintSUB (x%, y%, c%, borderc%)Fill Region4WG
PsetSUB (x%, y%, c%)Pixel plot3WG
RectangleSUB (x1%, y1%, x2%, y2%, c%)Draws a rectangle5WG
RotateSUB (xOrigin%, yOrigin%, Angle%)Rotates entire bitmap at specified origin3W
RoundRectSUB (x1%, y1%, x2%, y2%, x3%, y3%, c%)Draws & Fills a rounded rectangle7W
SaveToFileSUB (FileName$)Save BMP to a file1W
SaveToStreamSUB (Stream)Save BMP to a stream1W
StretchDrawSUB (Rect AS QRECT, BMP)Draw BMP and stretch to fit inside Rect2W
TextHeightFUNCTION (Text$) AS WORDReturns the height, in pixels, of Text$ string1W
TextWidthFUNCTION (Text$) AS WORDReturns the width, in pixels, of Text$ string1W
TextRectSUB (Rect AS QRECT, x%, y%, S$, fc%, bc%)Write text, and clip within region Rect6W
TextOutSUB (x%, y%, S$, fc%, bc%)Writes text to image5WG


QBitmap Examples
DIM BitMap AS QBitMap

BitMap.BMP = "close.bmp"

CREATE Form AS QForm
  CREATE Image1 AS QImage
    Left = 100
    Draw 5, 5, BitMap.BMP
  END CREATE
  Center
  ShowModal
END CREATE

Prev Component Contents Next Component
掌柜推荐
 
 
¥860.00 ·
 
 
¥900.00 ·
 
 
¥810.00 ·
 
 
¥317.00 ·
 
 
¥1,370.00 ·
 
 
¥660.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:29