Kivy Chinese Tutorial Example Primer (Simple Paint App): 0. Project Introduction & Results show

Source: Internet
Author: User

This tutorial will lead you to learn to create your own widgets (widgets). In the end, the work we finished is a simple artboard program.

When creating an app with Kivy, we need to consider the following 3 questions:

    1. What data does the app we create need to process?
    2. How do I visualize this data?
    3. How do users interact with this data?

Taking the simple artboard of this tutorial as an example, we want users to be able to draw on the touch screen with their fingers, which is how the user interacts with the data. To achieve such an interaction, we need to record the location of the user's finger, which is the data that the application needs to process. Drawing lines between different locations is the way data is presented.

In Kivy applications, the user interface (UI) is made up of a number of widgets. Everything you see on the screen is, in the final analysis, drawn by a widget. Each widget encapsulates data, interaction, and visual presentation of these three elements (that is, the 3 questions that correspond to the previous one). Using a wide range of widgets, we can develop a variety of applications. Although Kivy has built in many parts, such as buttons, sliders, and so on, there are many times when we need to develop custom widgets to meet specific user needs. In this tutorial, Dr. Mi teaches you how to develop custom widgets.

In summary, when developing a custom widget, keep in mind the three elements of the Kivy widget (data, interaction, rendering). At the same time, it is reasonable to plan the function of the window parts, to split the large parts into smaller, reusable parts, that is, to observe the single duty principle (Responsibility Principle).

"Original link"

http://www.ipaomi.com/2017/11/05/kivy-Chinese tutorial-Getting started with an example-simple artboard-simple-paint-app:0-Project Introduction-cheng/

Kivy Chinese Tutorial Example Primer (Simple Paint App): 0. Project Introduction & Results show

Related Article

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.