' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' 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/ W QTABCONTROL 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%, Draw & Fill 6 y2%, c%, fill%) Circle CopyRect D and S are QRECTs, SUB (D, Image, S) Image can be a 3 QImage, QCanvas, or QBitmap Draw SUB (x%, y%, BMP) Draw Bitmap at 3 (X,Y) Fill SUB (DevCol%) Fill screen (not 1 traditional colors) FillRect SUB (x1%, y1%, x2%, Draw & Fill a 5 y2%, c%) rectangle Copies off-screen Flip SUB buffer to visible 0 page Init SUB (Width%, Create Screen 2 Height%) Line SUB (x1%, y1%, x2%, Draws a line 5 y2%, c%) Paint SUB (x%, y%, c%, Fill Region 4 borderc%) Pset SUB (x%, y%, c%) Pixel Plot 3 Rectangle SUB (x1%, y1%, x2%, Draws a rectangle 5 y2%, c%) Release SUB Force update 0 SUB (xOrigin%, Rotates entire Rotate yOrigin%, Angle%) screen at specified 3 origin RoundRect SUB (x1%, y1%, x2%, Draws & Fills a 7 y2%, x3%, y3%, c%) rounded rectangle StretchDraw SUB (Rect AS QRECT, Draw BMP and BMP) stretch to fit 2 inside Rect TextHeight FUNCTION (Text$) AS Returns the height, WORD in pixels, of Text$ 1 string TextWidth FUNCTION (Text$) AS Returns the width, WORD in pixels, of Text$ 1 string TextRect SUB (Rect AS QRECT, Write text, and x%, y%, S$, fc%, clip within region 6 bc%) Rect TextOut SUB (x%, y%, S$, Writes text 5 fc%, bc%) QDXScreen 3D Methods Method Type Description Params ==================== ================== =================== =================== AddLight SUB (Light AS Add light to scene 1 QD3DLight) CameraLookAt SUB (F AS QD3DFrame, Fix frame and 2 Constraint AS constrain rotation INTEGER) CreateFace SUB (Face AS Creates a face 1 QD3DFace) CreateFrame SUB (Frame AS Creates frame 1 QD3DFrame) CreateLightRGB SUB (LightType%, R#, G#, B#, Light Create light object 5 AS QD3DLight) CreateMeshBuilder SUB (MB AS Creates meshbuilder 1 QD3DMeshBuilder) CreateShadow SUB (MB AS QD3DMeshBuilder, Light AS Creates a visual QD3DLight, px#, shadow object 9 py#, pz#, nx#, ny#, nz#, V AS QD3DVisual) CreateWrap SUB (WrapType%, A#, B#, C#, D#, Creates a wrap E#, F#, G#, H#, object 15 I#, J#, K#, L#, M#, W AS QD3DWrap) ForceUpdate SUB (X1%, Y1%, Force update on 4 X2%, Y2%) specific region LoadTexture SUB (File AS Create a texture STRING, Tex AS object 2 QD3DTexture) Move SUB (D AS DOUBLE) Moves/animates 1 scene SetBackgroundImage SUB (Tex AS Set background 1 QD3DTexture) image for scene SetCameraPosition SUB (X#, Y#, Z#) Set camera position 3 for entire scene SetCameraOrientation SUB (DX#, DY#, Set camera DZ#, UX#, UY#, orientation for 6 UZ#) scene SetRenderMode SUB (M AS INTEGER) Set render mode for 1 scene SetTextureQuality SUB (Quality AS Set texture quality 1 INTEGER) for scene QDXScreen Events Event Type Occurs when... Params =================== =================== =================== =================== OnClick VOID Mouse button 0 clicked OnDblClick VOID Mouse button double 0 clicked OnInitialize VOID DirectX succeeds in 0 initializing Another event for OnInitializeSurface VOID you to do 0 initializing OnKeyDown SUB (Key AS Word, Key held down 2 Shift AS INTEGER) OnKeyPress SUB (Key AS BYTE) User presses a key 1 OnMouseDown SUB (Button%, X%, Mouse button held 3 Y%) down OnMouseMove SUB (X%, Y%) Mouse moves 2 OnMouseUp SUB (Button%, X%, Mouse button is 3 Y%) released 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 ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb