Mochuan Drives - Professional design, manufacturer HMI Touch Screen Panel & PLC Controller, provide industry solutions and system integration since 2009.




  • Professional design, manufacturer HMI Touch Screen Panel & PLC Controller, provide industry solutions and system integration since 2009.

Language
Case
VR

Canvas

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.


Basic Information
  • Year Established
    --
  • Business Type
    --
  • Country / Region
    --
  • Main Industry
    --
  • Main Products
    --
  • Enterprise Legal Person
    --
  • Total Employees
    --
  • Annual Output Value
    --
  • Export Market
    --
  • Cooperated Customers
    --
Contact Us

Take advantage of our unrivaled knowledge and experience, we offer you the best customization service.

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!    

Recommended
They are all manufactured according to the strictest international standards. Our products have received favor from both domestic and foreign markets.
They are now widely exporting to 200 countries.

Send your inquiry

Choose a different language
English
ภาษาไทย
Deutsch
Español
français
italiano
Português
русский
Current language:English