Appinventor Study Notes (iii)--Paint bucket application Learning

Source: Internet
Author: User

One, component settings 1, Brush color options

Select 3 button, then rename to Red, yellow, green three colors, and then set the corresponding properties.

Here's a question of how to put it in one line.

Put 3 buttons in this box and you can turn into one line.

2. Canvas settings

Choose this tool, change the properties, put the picture you like, set the initial brush color to red.

3, Function button settings.

Follow the 4 buttons on this chart.

4. Display information

Put 2 labels on it, set title.

Second, block programming 1, global variable settings

Select Block in the box, and then change the name to Dotsize, setting the initial value to 2.

2. Canvas Logic Programming

(1) Draw points

Add this tool, then there are x,y,touchedanysprite three properties, you can choose to extract, or assign to other variables. The method is to hover over the mouse.

Add the tool into the touched and assign the X,y,radius with the existing variable.

This logic is done.

(2) Draw line

The same way, the block is still found in the canvas to be added.

To explain here, dragged is the point of movement when grabbing a touch, but only the beginning, the point of the last moment, and the current moment of the store.

In this way, we can use line segments to fit the line, and the screen pixel point is very small, the curve looks very smooth on the macroscopic.

3. Settings for brush options.

When clicked, set the brush color and label.

Other colors are the same.

4. Function button Setting

(1) Adjust the radius of the drawing point, adjust the radius of the dot

When clicked, set the dot radius and label.

(2) Camera function button setting

First add the click Function, then select Block in the camera, one is to open the photo

The other is to do the processing after the camera is opened.

In which to add the action to be done, here is the background change.

5. Clear the button settings

Find the empty button from the canvas.

Third, the finished product is as follows

Appinventor Study Notes (iii)--Paint bucket application Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.