This video is major introduce canvas of hmi
Welcome to the touch screen operation video tutorial, today we talk about canvas. The principle of canvas components this to first establish a theme and specify the size, such as 100 × 100, then you need 10,000 points to fill the canvas, first we look at the monochrome brush type canvas, click on the components - practical tools - canvas, first change the size of the canvas, 100 × 100, and then you can see the address occupied by this side length is 10,000, if the setting is LB0, then the occupied address is LB0 to 9999, when the value of LB0 is equal to 0, the colour of the canvas can choose black, when the value is 1, the colour of the brush is red, click OK, adjust the size, LB0 to LB9999 can be achieved by macro instructions, set a button to execute macro instructions, you can look at the code, with You can see that the canvas colour changes to red after you click Start Painting. Then look at the multi-colour brush type, which is click on Components - Utilities - Canvas, change the brush type to multi-colour brush, then change the size of the canvas, 100 x 100, you can see that the length of this side of the address becomes 10,000, if the first address is LW0, then the corresponding address is LW0 to 9999, their value is to change the colour of the canvas, its colour is displayed through the form of RGB565, RGB565 colour mode a pixel occupies two bytes, where the first five bits of the low byte indicates G, the last three bits of the low byte and the first three bits of the high byte indicates B, the last five bits of the high byte indicates R. Here set a value to lose components to set the colour, the address is LW0, the digital format is changed to this 16 The address is LW0, the digital format is changed to this 16-bit hexadecimal, LW0 ~ 9999 through macro instructions to achieve, you can see this side is the address alias is lw0, with a loop to lw0 value assigned to lw1 ~ 9999, offline simulation, enter a colour (whatever, such as 780f), click to start painting, you can see the canvas colour change. This is the end of the canvas, thank you for watching.
Get in touch
Please provide us with the information below to complete your request. Just leave your email or phone number in the contact form so we can send you a free quote for our wide range of designs!
Copyright © 2023 Wuxi Mochuan Drives Technology Co.,Ltd 无锡默川传动技术有限公司- www.mochuan-drives.com All Rights Reserved.