eprime语句.docx

上传人:b****6 文档编号:7103084 上传时间:2023-01-17 格式:DOCX 页数:12 大小:17.95KB
下载 相关 举报
eprime语句.docx_第1页
第1页 / 共12页
eprime语句.docx_第2页
第2页 / 共12页
eprime语句.docx_第3页
第3页 / 共12页
eprime语句.docx_第4页
第4页 / 共12页
eprime语句.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

eprime语句.docx

《eprime语句.docx》由会员分享,可在线阅读,更多相关《eprime语句.docx(12页珍藏版)》请在冰豆网上搜索。

eprime语句.docx

eprime语句语句1DisplayDeviceObject(topic)DisplayDeviceisanabstractobjectderivedfromDevice.DisplayDeviceaddsfunctionalityrelatedtotheconfigurationofthedisplay,suchastherefreshrateandresolution.PropertiesCalculatedRefreshDurationIDSegmentCopyVerticalOffsetVerticalBlankSimulatedCountCalculatedRefreshRateNameTagVerticalBlankSimulationEnabledColorDepthRefreshDurationStatsVerticalBlankDetectedCountXResEchoClientsSegmentCopyMaxHeightVerticalBlankDurationStatsYResMethodsCalcActualRefreshRateCloseOpenSuspendCalculateRefreshRateCreateCanvasPaletteWaitForVerticalBlankCanvasGetStateResumeSeeAlsoCanvasObject(topic)DeviceObject(topic)PaletteObject(topic)2DisplayDevice.CreateCanvas(method)SyntaxSetCanvasName=Display.CreateCanvasDescriptionCreatesthecurrentcanvas,CanvasName,asanoffscreencanvasCommentsTheoffscreencanvaswillremainoffscreenuntilitissetasthecurrentdisplaycanvasPortionsoftheoffscreencanvascanbecopiedtothecurrentdisplaycanvasbyusingtheCanvas.CopymethodExampleThisexampleloadstheBlueCar.bitmapontotheoffscreencanvas,thencopiesittothedisplaycanvas.Declaretwocanvases,oneoff-screen,andoneastheactivedisplayDimcnvsAsCanvasDimoffScreenCnvsAsCanvasusetheCanvasmethodtocreateanactivedisplaycanvasSetcnvs=Display.CanvasusetheCreateCanvastocreateanoff-screencanvasSetoffScreenCnvs=Display.CreateCanvasDeclaretworectanglestodefinethesourceanddestinationareasDimsrcAsRectDimdestAsRectdefinesourcerectasfullscreensrc.Left=0src.Top=0src.Right=Display.XRessrc.Bottom=Display.YResdefinedestinationrectastopleftquadrantdest.Left=0dest.Top=0dest.Right=Display.XRes/2dest.Bottom=Display.YRes/2cnvs.TextColor=CColor(blue)cnvs.TextDisplay.XRes/2,Display.YRes/2,Loadingimage.Sleep(3000)LoadtheimagetooffscreencanvasoffScreenCnvs.FillColor=CColor(Blue)offScreenCnvs.ClearoffscreenCnvs.LoadImagebluecar.bmpCopyimagetodisplaycanvascnvs.TextDisplay.XRes/2,Display.YRes/2,Copyingvs.CopyoffScreenCnvs,src,destSleep3000Note:

TorunthisexamplewithE-BasicExample.es,copythescriptaboveandpasteitintotheSetupInLineobject.Also,besuretocopytheBlueCarbitmapfromPictureRTfoldertotheMyExperiments/TutorialsfolderwhereE-BasicExample.esislocated.SeeAlsoDisplayDeviceObject(topic)3DisplayDevice.Canvas(method)SyntaxSetCanvasName=Display.CanvasDescriptionSetsareferencetocreatethecanvas,CanvasName,asthecurrent,onscreencanvasCommentsAllchangesmadetoCanvasNamewillbeimmediatelyvisiblewhenCanvasNameisthecurrent,onscreencanvasExampleThisexampledrawsasingleredlineontheonscreencanvas.CreateaCanvasDimcnvsAsCanvasMakecnvsthecurrent,onscreencanvasSetcnvs=Display.CanvasSetthewidthandcolorofthepencnvs.PenWidth=5cnvs.PenColor=CColor(255,0,0)DrawaLineinredcnvs.Line100,100,200,100Sleep1000Note:

TorunthisexamplewithE-BasicExample.es,copythescriptaboveandpasteitintotheBeforeInLineobject.SeeAlsoCanvasObject(topic)DisplayDeviceObject(topic)4CanvasObject(topic)TheCanvasObjectabstractstheprogramminginterfacetoaparticularcanvas.PropertiesBackStyleFontNameIDROPModeTextColorFillColorFontSizeNameSourceColorKeyFontBoldFontStrikeoutPenColorTagFontItalicFontUnderlinePenWidthTextBackColorMethodsArcClearLineToPieSaveImageCalculateTextSizeCopyLoadImagePolygonSetPixelChordGetPixelMoveToRectangleTextCircleLineOvalRoundedRectangleSeeAlsoDisplayDeviceObject(topic)5RteObject(topic)TheRteObjectisanabstractobjectandistherootofallotherobjects.PropertiesNameIDTagSeeAlsoClockObject(topic)InputMaskObject(topic)DebugObject(topic)OrderObject(topic)PRNGObject(topic)PaletteObject(topic)Rte(topic)ResponseDataObject(topic)CanvasObject(topic)RteAuditObject(topic)CellSpecObject(topic)RteCollectionObject(topic)ContextObject(topic)SlideStateObject(topic)DataFileObjectSlideStimObject(topic)DeletionObject(topic)SoundBufferObject(topic)DeviceObject(topic)SummationObject(topic)DeviceManagerObject(topic)TriggerObject(topic)EchoClientObject(topic)6ClockObject(topic)TheClockObjectabstractsthecurrentreal-timeclockthatisinuse.TheClockObjectisrun-timeonly.PropertiesIDNameScaleTagMethodsReadRead100thMillisecMicrosecResetScaleRead10thMillisecRead1000thMillisecReadMillisecSeeAlsoRteObject(topic)DisplayDevice.WaitForVerticalBlank(method)Syntax7DisplayDevice.WaitForVerticalBlankDescriptionWaitsforthestartofthenextrefreshcyclebeforemovingtonextstatementComments?

ThispropertyreturnsorsetsaBooleanvalue?

Waitingfortheverticalblankisessentialtoensurecontentsdrawntothescreenoccurwithinonescreenrefresh.?

ConsiderpreparingitemsinanoffscreenCanvasandtheusingCanvas.CopyafteracalltoDisplayDevice.WaitForVerticalBlanktoensurecontentsdrawntothescreenoccurwithinonescreenrefresh.?

WhenDisplayDevice.VerticalBlankSimulationEnable=Truethesystemwillusebothhardwareandsoftwareoperationstowaitfortheverticalblankevent.Thesystemcollectsstatisticsonthetimingofthehardwareverticalblankeventsandthenusesmathematicalcalculationstopredictthestarttimeofthenextrefreshcycle.Ifahardwareverticalblankeventisnotobservedwithinthepredictedtime,thecallwillsimulatetheverticalblankeventinsoftwareandcontinue.?

WhencallingDisplayDevice.WaitForVerticalBlankinsuccession,aSleepcommandshouldbecalledbetweensuccessivecallssincetheverticalblankcouldbeoccurringandwouldimmediatelyreturn.ASleepdurationof?

oftherefreshdurationshouldbeused.ExampleThisexampleloadsanimagetothecurrentcanvas,copiesthatimagetoanoff-screencanvas,thenusesthatimagetopresentanimation.CreateaCanvasDimcnvsAsCanvasSetcnvs=Display.CanvasDimx,y,i,carlengthAsIntegerx=10y=150carlength=250Createoff-screencanvasDimoffScreenCnvsAsCanvasSetoffScreenCnvs=Display.CreateCanvasoffScreenCnvs.ClearoffScreenCnvs.SourceColorKey=CColor(black)DefinethesourceanddestinationrectanglesDimcarRectAsRectcarRect.Left=0carRect.Right=carlengthcarRect.Top=0carRect.Bottom=150Loadtheimagetotheactivedisplay,thencopyoff-screenImageDisplay1.DrawSleep2000offScreenCnvs.Copycnvs,carRect,carRectDefinedestinationrectangleDimdestRectAsRectdestRect.Left=xdestRect.Right=x+carlengthdestRect.Top=ydestRect.Bottom=y+150cnvs.FillColor=CColor(blue)Fori=1toDisplay.XRes-carlengthcnvs.clearDisplay.WaitForVerticalBlankcnvs.CopyoffScreenCnvs,carRect,destRect,_ebEffectSourceColorKeyx=x+1destRect.Left=xdestRect.Right=x+carlengthSleep20NextiTorunthisexamplewithE-BasicExample.es,copythescriptaboveandpasteitintotheAfterInLineobject.CreatetheImageDisplay1objectintheUnreferencedE-Objectsfolder.InthePropertiesWindowforImageDisplay1,setFilenametoredcar.bmp,andBackColortoblue.Inaddition,settheAlignHorizontaltoleftandAlignVerticaltotop.SeeAlsoCanvasObject(topic)DisplayDeviceObject(topic)8Canvas.Clear(method)SyntaxCanvas.ClearDescriptionClearstheCanvas.CommentsTheCanvaswillbeclearedusingthecurrentFillColorsetting.ExampleThisexampleclearsthecanvastoblue.CreateaCanvasDimcnvsAsCanvasSetcnvs=Display.Canvascnvs.FillColor=CColor(Blue)cnvs.ClearSleep(1000)Note:

TorunthisexamplewithE-BasicExample.es,copythescriptaboveandpasteitintotheAfterInLineobject.9Canvas.SourceColorKey(property)SyntaxCanvas.SourceColorKeyDescriptionSetsthesourcecolorkeyfortransparencyduringcopyoperations.CommentsThesourcecolorkeyallowsthesourcetodesignateareasofitselftobetransparentduringcopyoperations.Anyareasappearinginthesourcecolorkeywillbetransparentwhencopiedtoadifferentsurface.ExampleThisexampleloadsanimagetothecurrentcanvas,copiesthatimagetoanoff-screencanvas,thenusesthatimagetopresentanimation.CreateaCanvasDimcnvsAsCanvasSetcnvs=Display.CanvasDimx,y,i,carlengthAsIntegerx=10y=150carlength=250Createoff-screencanvasDimoffScreenCnvsAsCanvasSetoffScreenCnvs=Display.CreateCanvasoffScreenCnvs.ClearoffScreenCnvs.SourceColorKey=CColor(black)DefinethesourceanddestinationrectanglesDimcarRectAsRectcarRect.Left=0carRect.Right=carlengthcarRect.Top=0carRect.Bottom=150Loadtheimagetotheactivedisplay,thencopyoff-screenImageDisplay1.DrawSleep2000offScreenCnvs.Copycnvs,carRect,carRectDefinedestinationrectangleDimdestRectAsRectdestRect.Left=xdestRect.Right=x+carlengthdestRect.Top=ydestRect.Bottom=y+150cnvs.FillColor=CColor(blue)Fori=1toDisplay.XRes-carlengthcnvs.clearDisplay.WaitForVerticalBlankcnvs.CopyoffScreenCnvs,carRect,destRect,ebEffectSourceColorKeyx=x+1destRect.Left=xdestRect.Right=x+carlengthSleep20NextiTorunthisexamplewithE-BasicExample.es,copythescriptaboveandpasteitintotheAfterInLineobject.CreatetheImageDisplay1objectintheUnreferencedE-Objectsfolder.InthePropertiesWindowforImageDisplay1,setFilenametoredcar.bmp,andBackColortoblue.RedCar.bmpislocatedintheSamplesPictureRTfolderaspartoftheE-Primeinstall.Inaddition,settheAlignHorizontaltoleftandAlignVerticaltotop.SeeAlsoCanvasObject(topic)10PointInRect(method)SyntaxbIsInRect=PointInRect(point,rect)DescriptionDeterminesifthepointcoordinateisapartofanyofthecoordinatesforagivenrectangle.Comments?

The1stparameter,point,isarequiredPointstructurethatrepresentsthecoordinatetotest.?

The2ndparameter,rect,isarequiredRectstructurethatrepresentstherectangletotestagainst.?

Thevaluereturned,bIsInRect,isaBooleanvaluerepresentingifthecoordinateispartofanyoftherectanglescoordinates.ExampleThefollowingexampleshowshowP

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1