资源预览内容
第1页 / 共12页
第2页 / 共12页
第3页 / 共12页
第4页 / 共12页
第5页 / 共12页
第6页 / 共12页
第7页 / 共12页
第8页 / 共12页
第9页 / 共12页
第10页 / 共12页
亲,该文档总共12页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1 DisplayDevice Object (topic)DisplayDevice is an abstract object derived from Device. DisplayDevice adds functionality related to the configuration of the display, such as the refresh rate and resolution.PropertiesCalculatedRefreshDuration IDSegmentCopyVerticalOffset VerticalBlankSimulatedCount CalculatedRefreshRate NameTagVerticalBlankSimulationEnabled ColorDepth RefreshDurationStats VerticalBlankDetectedCount XRes EchoClients SegmentCopyMaxHeight VerticalBlankDurationStats YRes MethodsCalcActualRefreshRate Close Open Suspend CalculateRefreshRate CreateCanvas PaletteWaitForVerticalBlankCanvas GetStateResumeSee AlsoCanvas Object (topic)Device Object (topic) Palette Object (topic)2 DisplayDevice.CreateCanvas (method)SyntaxSet CanvasName = Display.CreateCanvasDescriptionCreates the current canvas, CanvasName, as an offscreen canvasCommentsThe offscreen canvas will remain offscreen until it is set as the current display canvasPortions of the offscreen canvas can be copied to the current display canvas by using the Canvas.Copy methodExampleThis example loads the BlueCar.bitmap onto the offscreen canvas, then copies it to the display canvas.Declare two canvases, one off-screen, and one as the active displayDim cnvs As CanvasDim offScreenCnvs As Canvasuse the Canvas method to create an active display canvasSet cnvs = Display.Canvasuse the CreateCanvas to create an off-screen canvasSet offScreenCnvs = Display.CreateCanvasDeclare two rectangles to define the source and destination areasDim src As RectDim dest As Rectdefine source rect as full screensrc.Left = 0src.Top = 0src.Right = Display.XRessrc.Bottom = Display.YResdefine destination rect as top left quadrantdest.Left = 0dest.Top = 0dest.Right = Display.XRes/2dest.Bottom = Display.YRes/2cnvs.TextColor = CColor (blue)cnvs.Text Display.XRes/2, Display.YRes/2, Loading image.Sleep(3000)Load the image to off screen canvasoffScreenCnvs.FillColor = CColor(Blue)offScreenCnvs.ClearoffscreenCnvs.LoadImage bluecar.bmpCopy image to display canvascnvs.Text Display.XRes/2, Display.YRes/2, Copying image.cnvs.Copy offScreenCnvs, src, destSleep 3000Note: To run this example with E-BasicExample.es, copy the script aboveand paste it into the Setup InLine object. Also, be sure to copy theBlueCar bitmap from PictureRT folder to the My Experiments/Tutorialsfolder where E-BasicExample.es is located.See Also DisplayDevice Object (topic)3 DisplayDevice.Canvas (method)SyntaxSet CanvasName = Display.CanvasDescriptionSets a reference to create the canvas, CanvasName, as the current, onscreen canvasCommentsAll changes made to CanvasName will be immediately visible when CanvasName is the current, onscreen canvasExampleThis example draws a single red line on the onscreen canvas.Create a CanvasDim cnvs As CanvasMake cnvs the current, onscreen canvasSet cnvs = Display.CanvasSet the width and color of the pencnvs.PenWidth = 5cnvs.PenColor = CColor(255,0,0)Draw a Line in redcnvs.Line 100, 100, 200, 100Sleep 1000Note: To run this example with E-BasicExample.es, copy the script aboveand paste it into the Before InLine object.See Also Canvas Object (topic) DisplayDevice Object (topic)4 Canvas Object (topic)The Canvas Object abstracts the programming interface to a particular canvas.PropertiesBackStyle FontName IDROPMode TextColor FillColor FontSize NameSourceColorKeyFontBold FontStrikeout PenColor TagFontItalic FontUnderline PenWidthTextBackColor MethodsArc ClearLineTo Pie SaveImage CalculateTextSize CopyLoadImage PolygonSetPixel Chord GetPixelMove ToRectangle Text Circle LineOvalRoundedRectangleSee Also DisplayDevice Object (topic)5 RteObject (topic)The RteObject is an abstract object and is the root of all other objects.PropertiesName IDTag See Also Clock Object (topic) InputMask Object (topic) Debug Object (topic) Order Object (topic) PRNG Object (topic) Palette Object (topic) Rte (topic) ResponseData Object (topic) Canvas Object (topic) RteAuditObject (topic) CellSpec Object (topic) RteCollection Object (topic) Context Object (topic) SlideState Object (topic) DataFile Object SlideStim Object (topic) Deletion Object (topic) SoundBuffer Object (topic) Device Object (topic) Summation Object (topic) DeviceManager Object (topic) Trigger Object (topic) EchoClient Object (topic)6 Clock Object (topic)The Clock Object abstracts the current real-time clock that is in use. The Clock Object is run-time only.PropertiesIDNameScale Tag MethodsRead Read100thMillisec Microsec ResetScale Read10thMillisecRead1000thMillisec ReadMillisec See Also
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号