Method |
Type |
Description |
Params |
Support |
|
|
|
|
|
Circle |
SUB (x1%, y1%, x2%, y2%, c%, fill%) |
Draw & Fill Circle |
6 |
WXG |
CopyRect |
SUB (D, Image, S) |
D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap |
3 |
W |
|
Example (copies QIMAGE to canvas at
10,10):
DIM Destination AS QRECT DIM
Source AS QRECT DIM Image AS QIMAGE Image.BMP =
"whatever.bmp"
SUB CanvasPaint (Sender AS QCANVAS) 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 Sender.CopyRect(Destination, Image,
Source) END SUB
DIM Canvas AS QCANVAS Canvas.OnPaint =
CanvasPaint
|
Draw |
SUB (x%, y%, BMP) |
Draw Bitmap on Canvas |
3 |
WG |
|
Details: BMP can be any BMP
property from QBitmap, QImage, QImageList, etc. any component with a BMP
property is fine. Examples:
DIM Image1 AS QIMAGE Image1.BMP
= "whatever.bmp" DIM Image2 AS QBITMAP Image2.BMP =
"whatever.bmp"
SUB CanvasPaint (Sender AS
QCANVAS) Sender.Draw(0, 0, Image1.BMP) Sender.Draw(50, 50,
Image2.BMP) END SUB
DIM Canvas AS QCANVAS Canvas.OnPaint =
CanvasPaint
|
FillRect |
SUB (x1%, y1%, x2%, y2%, c%) |
Draws & Fills a rectangle |
5 |
WXG |
Line |
SUB (x1%, y1%, x2%, y2%, c%) |
Draws a line |
5 |
WXG |
Paint |
SUB (x%, y%, c%, borderc%) |
Fill Region |
4 |
WXG |
Pset |
SUB (x%, y%, c%) |
Pixel plot |
3 |
WXG |
Rectangle |
SUB (x1%, y1%, x2%, y2%, c%) |
Draws a rectangle |
5 |
WXG |
Repaint |
SUB |
Force repainting |
0 |
W |
Rotate |
SUB (xOrigin%, yOrigin%, Angle%) |
Rotates entire canvas at specified origin |
3 |
W |
RoundRect |
SUB (x1%, y1%, x2%, y2%, x3%, y3%, c%) |
Draws & Fills a rounded rectangle |
7 |
W |
StretchDraw |
SUB (Rect AS QRECT, BMP) |
Draw image 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 |
WXG |