# CanvasComponent **Repository Path**: cnzzzzz0930/CanvasComponent ## Basic Information - **Project Name**: CanvasComponent - **Description**: 基于画布组件,实现自定义抽奖转盘功能。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 7 - **Created**: 2025-06-04 - **Last Updated**: 2025-06-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Custom Prize Wheel ### Introduction Learn how to customize a prize wheel based on the canvas component. Example: ### Concepts - Stack: a component that allows child components to be successively stacked, with the latter one overwriting the previous one. - Canvas: a component that is used to customize drawings. - CanvasRenderingContext2D: a component that uses **RenderingContext** to draw rectangles, text, images, and other objects on a canvas. - Explicit animation (**animateTo**): a transition animation when the status changes due to the closure code. - Custom dialog box: a custom dialog box that is displayed by using the **CustomDialogController** class. ### Permissions N/A ### How to Use 1. Tap the Start icon on the round wheel to start the lucky draw. 2. After the prize wheel stops spinning, the lucky draw ends, with its text and images displayed. ### Constraints 1. The sample is only supported on Huawei phones with standard systems. 2. HarmonyOS: HarmonyOS 5.0.0 Release or later. 3. DevEco Studio: DevEco Studio 5.0.0 Release or later. 4. HarmonyOS SDK: HarmonyOS 5.0.0 Release SDK or later.