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

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

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


QIMAGE Component

QImage is used to display a graphical image (BMP/ICON). It can also be used to draw primitive graphics.

QImage Properties
FieldTypeR/WDefault




AlignINTEGERRWalNone
Align determines how the control aligns within its parent control.
AutosizeINTEGERRWFalse
AutoSize determines whether the image control resizes to accommodate the image it displays.
BMPSTRINGRW
Use BMP to assign a new bitmap file, or to store BMP in the image cache.
Examples:
DIM Image AS QIMAGE
Image.BMP = "whatever.bmp"
BMPHandleRESOURCEW
CenterINTEGERRWFalse
Center positions the image so that it is centered in the image control.
CopyModeINTEGERRWcmBlackness
CursorINTEGERRWcrDefault
EnabledINTEGERRWTrue
FontQFONTW
HandleINTEGERRW
HeightINTEGERRW
HintSTRINGRW
ICOHandleRESOURCEW
IconSTRINGW
IncrementalDisplayINTEGERRWFalse
IncrementalDisplay specifies whether partial renderings of the image are drawn periodically during slow operations or on large compressed images.
LeftINTEGERRW0
ParentQFORM/QPANEL/QTABCONTROLW
Pixel2D ARRAY of INTEGERRW
PopupMenuQPOPUPMENUW
ShowHintINTEGERRWFalse
StretchINTEGERRWFalse
Stretch resizes the image so that it exactly fits the bounds of the image control.
TagINTEGERRW
TopINTEGERRW0
TransparentINTEGERRWFalse
WidthINTEGERRW
VisibleINTEGERRWTrue

QImage Methods
MethodTypeDescriptionParams




CenterSUBCenters image0
CircleSUB (x1%, y1%, x2%, y2%, c%, fill%)Draw & Fill Circle6
CopyRectSUB (D, Image, S)D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap3
DrawSUB (x%, y%, BMP)Draw Bitmap at (X,Y)3
FillRectSUB (x1%, y1%, x2%, y2%, c%)Draws & Fills a rectangle5
LineSUB (x1%, y1%, x2%, y2%, c%)Draws a line5
PaintSUB (x%, y%, c%, borderc%)Fill Region4
PsetSUB (x%, y%, c%)Pixel plot3
RectangleSUB (x1%, y1%, x2%, y2%, c%)Draws a rectangle5
RepaintSUBForce repainting of image0
RotateSUB (xOrigin%, yOrigin%, Angle%)Rotates entire image at specified origin3
RoundRectSUB (x1%, y1%, x2%, y2%, x3%, y3%, c%)Draws & Fills a rounded rectangle7
StretchDrawSUB (Rect AS QRECT, BMP)Draw BMP and stretch to fit inside Rect2
TextHeightFUNCTION (Text$) AS WORDReturns the height, in pixels, of Text$ string1
TextWidthFUNCTION (Text$) AS WORDReturns the width, in pixels, of Text$ string1
TextRectSUB (Rect AS QRECT, x%, y%, S$, fc%, bc%)Write text, and clip within region Rect6
TextOutSUB (x%, y%, S$, fc%, bc%)Writes text to image5

QImage Events
EventTypeOccurs when...Params




OnClickVOIDUser clicked on image0
OnDblClickVOIDUser double clicked on image0
OnMouseDownSUB (Button%, X%, Y%, Shift%)Mouse button held down4
OnMouseMoveSUB (X%, Y%, Shift%)Mouse moves3
OnMouseUpSUB (Button%, X%, Y%, Shift%)Mouse button is released4


QImage Examples
  '-- How to use a resource file

  CONST False = 0
  CONST True = 1

  $RESOURCE RES_BMP1 AS "C:\WINDOWS\CLOUDS.BMP"

  DIM Form AS QForm
  DIM Image AS QImage

  Image.Parent = Form
  Image.Autosize = True
  Image.BMPHandle = RES_BMP1
  Form.ShowModal

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:38