Appendix B: QDXSCREEN
Rapid-Q Documentation by William Yu (c)1999 |
Appendix B: QDXSCREEN |
|
QDXSCREEN Component
QDXScreen allows you to create a DirectX screen for all your DXComponents.
All operations are done on the off-screen buffer, so nothing is displayed until
you flip to it. To use full screen mode, set FullScreen to true, and
make sure your form border style is bsNone.
QDXScreen Properties
Field | Type | R/W | Default |
|
|
|
|
Align | INTEGER | RW | alNone |
AllowStretch | INTEGER | RW | True |
AutoSize | INTEGER | RW | True |
BitCount | INTEGER | RW | 8 |
Color | INTEGER | RW | |
Cursor | INTEGER | RW | crDefault |
Enabled | INTEGER | RW | True |
Font | QFONT | W | |
FullScreen | INTEGER | RW | False |
Height | INTEGER | RW | |
Hint | STRING | RW | |
Left | INTEGER | RW | |
Parent | QFORM/QPANEL/QTABCONTROL | W | |
Pixel | 2D ARRAY of INTEGER | RW | |
ShowHint | INTEGER | RW | False |
Top | INTEGER | RW | |
Use3D | INTEGER | RW | False |
UseHardware | INTEGER | RW | True |
Visible | INTEGER | RW | True |
Width | INTEGER | RW | |
QDXScreen Methods
Method | Type | Description | Params |
|
|
|
|
Circle | SUB (x1%, y1%, x2%, y2%, c%, fill%) | Draw & Fill Circle | 6 |
CopyRect | SUB (D, Image, S) | D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap | 3 |
Draw | SUB (x%, y%, BMP) | Draw Bitmap at (X,Y) | 3 |
Fill | SUB (DevCol%) | Fill screen (not traditional colors) | 1 |
FillRect | SUB (x1%, y1%, x2%, y2%, c%) | Draw & Fill a rectangle | 5 |
Flip | SUB | Copies off-screen buffer to visible page | 0 |
Init | SUB (Width%, Height%) | Create Screen | 2 |
Line | SUB (x1%, y1%, x2%, y2%, c%) | Draws a line | 5 |
Paint | SUB (x%, y%, c%, borderc%) | Fill Region | 4 |
Pset | SUB (x%, y%, c%) | Pixel Plot | 3 |
Rectangle | SUB (x1%, y1%, x2%, y2%, c%) | Draws a rectangle | 5 |
Release | SUB | Force update | 0 |
Rotate | SUB (xOrigin%, yOrigin%, Angle%) | Rotates entire screen at specified origin | 3 |
RoundRect | SUB (x1%, y1%, x2%, y2%, x3%, y3%, c%) | Draws & Fills a rounded rectangle | 7 |
StretchDraw | SUB (Rect AS QRECT, BMP) | Draw BMP and stretch to fit inside Rect | 2 |
TextHeight | FUNCTION (Text$) AS WORD | Returns the height, in pixels, of Text$ string | 1 |
TextWidth | FUNCTION (Text$) AS WORD | Returns the width, in pixels, of Text$ string | 1 |
TextRect | SUB (Rect AS QRECT, x%, y%, S$, fc%, bc%) | Write text, and clip within region Rect | 6 |
TextOut | SUB (x%, y%, S$, fc%, bc%) | Writes text | 5 |
QDXScreen 3D Methods
Method | Type | Description | Params |
|
|
|
|
AddLight | SUB (Light AS QD3DLight) | Add light to scene | 1 |
CameraLookAt | SUB (F AS QD3DFrame, Constraint AS INTEGER) | Fix frame and constrain rotation | 2 |
CreateFace | SUB (Face AS QD3DFace) | Creates a face | 1 |
CreateFrame | SUB (Frame AS QD3DFrame) | Creates frame | 1 |
CreateLightRGB | SUB (LightType%, R#, G#, B#, Light AS QD3DLight) | Create light object | 5 |
CreateMeshBuilder | SUB (MB AS QD3DMeshBuilder) | Creates meshbuilder | 1 |
CreateShadow | SUB (MB AS QD3DMeshBuilder, Light AS QD3DLight, px#, py#, pz#, nx#, ny#, nz#, V AS QD3DVisual) | Creates a visual shadow object | 9 |
CreateWrap | SUB (WrapType%, A#, B#, C#, D#, E#, F#, G#, H#, I#, J#, K#, L#, M#, W AS QD3DWrap) | Creates a wrap object | 15 |
ForceUpdate | SUB (X1%, Y1%, X2%, Y2%) | Force update on specific region | 4 |
LoadTexture | SUB (File AS STRING, Tex AS QD3DTexture) | Create a texture object | 2 |
Move | SUB (D AS DOUBLE) | Moves/animates scene | 1 |
SetBackgroundImage | SUB (Tex AS QD3DTexture) | Set background image for scene | 1 |
SetCameraPosition | SUB (X#, Y#, Z#) | Set camera position for entire scene | 3 |
SetCameraOrientation | SUB (DX#, DY#, DZ#, UX#, UY#, UZ#) | Set camera orientation for scene | 6 |
SetRenderMode | SUB (M AS INTEGER) | Set render mode for scene | 1 |
SetTextureQuality | SUB (Quality AS INTEGER) | Set texture quality for scene | 1 |
QDXScreen Events
Event | Type | Occurs when... | Params |
|
|
|
|
OnClick | VOID | Mouse button clicked | 0 |
OnDblClick | VOID | Mouse button double clicked | 0 |
OnInitialize | VOID | DirectX succeeds in initializing | 0 |
OnInitializeSurface | VOID | Another event for you to do initializing | 0 |
OnKeyDown | SUB (Key AS Word, Shift AS INTEGER) | Key held down | 2 |
OnKeyPress | SUB (Key AS BYTE) | User presses a key | 1 |
OnMouseDown | SUB (Button%, X%, Y%) | Mouse button held down | 3 |
OnMouseMove | SUB (X%, Y%) | Mouse moves | 2 |
OnMouseUp | SUB (Button%, X%, Y%) | Mouse button is released | 3 |
QDXScreen Examples
$APPTYPE GUI
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
DIM Form AS QForm
Form.ClientHeight = 480
Form.ClientWidth = 640
DIM Screen AS QDXScreen
Screen.Parent = Form
Screen.Init(640, 480)
Screen.Align = alClient
Form.ShowModal
|
|