HarmonyOS/OpenHarmony应用开发-ArkTS画布组件(十七)
rectrect(x:number,y:number,w:number,h:number):void创建矩形路径。示例xxx.etsEntryComponentstructCanvasExample{privatesettings:RenderingContextSettingsnewRenderingContextSettings(true)privatecontext:CanvasRenderingContext2DnewCanvasRenderingContext2D(this.settings)build(){Flex({direction:FlexDirection.Column,alignItems:ItemAlign.Center,justifyContent:FlexAlign.Center}){Canvas(this.context).width(...