Rapid-Q Documentation by William Yu (c)1999 | Appendix A: QBITMAP |
Field | Type | R/W | Default | Support |
BMP | STRING | RW | W | |
Use BMP to assign a new bitmap file, or to store BMP in the image cache. Examples: DIM Bitmap AS QBITMAP | ||||
BMPHandle | RESOURCE | W | W | |
CopyMode | INTEGER | RW | cmBlackness
CONST cmBlackness = 0 ' Fill Destination rectange on the canvas with black | W |
Empty | INTEGER | R | W | |
Font | QFONT | W | W | |
Handle | INTEGER | RW | W | |
Height | INTEGER | RW | WG | |
Monochrome | INTEGER | RW | W | |
Pixel | 2D ARRAY of INTEGER | RW | WG | |
PixelFormat | INTEGER | RW | pfDevice '-- QBITMAP Pixel Formats CONST pfDevice = 0 CONST pf1bit = 1 CONST pf4bit = 2 CONST pf8bit = 3 CONST pf15bit = 4 CONST pf16bit = 5 CONST pf24bit = 6 CONST pf32bit = 7 | W |
Top | INTEGER | RW | WG | |
Transparent | INTEGER | RW | False | W |
TransparentColor | INTEGER | RW | W | |
TransparentMode | INTEGER | RW | 0 '-- QBITMAP TransparentMode CONST tmAuto = 0 CONST tmFixed = 1 | W |
Width | INTEGER | RW | WG |
Method | Type | Description | Params | Support |
Circle | SUB (x1%, y1%, x2%, y2%, c%, fill%) | Draw & Fill Circle | 6 | WG |
CopyRect | SUB (D, Image, S) | D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap | 3 | W |
Example (copies QIMAGE to bitmap at 10,10):DIM Destination AS QRECT | ||||
Draw | SUB (x%, y%, BMP) | Draw Bitmap on Canvas | 3 | WG |
FillRect | SUB (x1%, y1%, x2%, y2%, c%) | Draws & Fills a rectangle | 5 | WG |
Line | SUB (x1%, y1%, x2%, y2%, c%) | Draws a line | 5 | WG |
LoadFromFile | SUB (FileName$) | Load BMP from a file | 1 | W |
LoadFromStream | SUB (Stream) | Load BMP from a stream | 1 | W |
Paint | SUB (x%, y%, c%, borderc%) | Fill Region | 4 | WG |
Pset | SUB (x%, y%, c%) | Pixel plot | 3 | WG |
Rectangle | SUB (x1%, y1%, x2%, y2%, c%) | Draws a rectangle | 5 | WG |
Rotate | SUB (xOrigin%, yOrigin%, Angle%) | Rotates entire bitmap at specified origin | 3 | W |
RoundRect | SUB (x1%, y1%, x2%, y2%, x3%, y3%, c%) | Draws & Fills a rounded rectangle | 7 | W |
SaveToFile | SUB (FileName$) | Save BMP to a file | 1 | W |
SaveToStream | SUB (Stream) | Save BMP to a stream | 1 | W |
StretchDraw | SUB (Rect AS QRECT, BMP) | Draw BMP and stretch to fit inside Rect | 2 | W |
TextHeight | FUNCTION (Text$) AS WORD | Returns the height, in pixels, of Text$ string | 1 | W |
TextWidth | FUNCTION (Text$) AS WORD | Returns the width, in pixels, of Text$ string | 1 | W |
TextRect | SUB (Rect AS QRECT, x%, y%, S$, fc%, bc%) | Write text, and clip within region Rect | 6 | W |
TextOut | SUB (x%, y%, S$, fc%, bc%) | Writes text to image | 5 | WG |
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 |