Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Device and method for calling qt drawing based on jni multi-thread in android system

A multi-threading and threading technology, applied in 2D image generation, image data processing, extraction from basic elements, etc., can solve problems such as slow canvas drawing, and achieve the effect of improving work efficiency, obvious drawing speed, and improving user experience.

Active Publication Date: 2021-12-28
SHENZHEN HONGHE INNOVATION INFORMATION TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of this, the object of the present invention is to provide a kind of device and the method that Android system calls Qt drawing by JNI multi-threading, it adopts SurfaceView to carry out partial refresh technology, multi-threading technology, Qt drawing technology, effectively solves the Android system through canvas Problem with slow drawing

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Device and method for calling qt drawing based on jni multi-thread in android system
  • Device and method for calling qt drawing based on jni multi-thread in android system
  • Device and method for calling qt drawing based on jni multi-thread in android system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0035] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are to distinguish two entities with the same name but different parameters or parameters that are not the same, see "first" and "second" It is only for the convenience of expression, and should not be construed as a limitation on the embodiments of the present invention, which will not be described one by one in the subsequent embodiments.

[0036] As well known to those skilled in the art, Qt is a cross-platform C++ graphical user interface application program framework developed by Trolltech in 1991, which provides application developers with all the functions required to establish an art-level graphical...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a device and method for an Android system to call Qt drawing classes based on JNI multithreading, including: running the Android system, clearing the system memory, performing canvas initialization, activating the so dynamic library to prepare for calling Qt drawing classes, if the canvas If the initialization fails, the activation of the so dynamic library is carried out again; after the so dynamic library is successfully activated, the image data sampling thread and the SurfaceView drawing thread are started simultaneously under the environment of the first language; and the operation of executing the image data sampling thread is passed The drawing action MotionEvent event generates coordinate points, uses the Rect command to draw a rectangular frame according to the generated coordinate points, and loads the point coordinates float (x, y) to the so dynamic library, and the Qt drawing class according to the point coordinates float (x, y) Draw and execute the SurfaceView drawing thread at the same time, use the Android system's own SurfaceView to draw, and display the surface drawn by SurfaceView on the display. As a result, the drawing speed is significantly improved, and cross-platform calls are realized at the same time.

Description

technical field [0001] The invention relates to the field of embedded platform drawing, in particular to a device and method for calling Qt drawing by Android based on JNI multithreading. Background technique [0002] Currently, smart terminals using the Android operating system are widely used. The Android system usually uses a graphics processing engine, the 2D part is provided by the android SDK itself, the 3D part uses Open GL ES 1.0, and the APIs used in the 2D part are mainly in the android.graphics and android.graphics.drawable packages, which provide Canvas, ColorFilter, Point (point) and RetcF (rectangle) related to graphics processing, and some animation related ones such as AnimationDrawable, BitmapDrawable and TransitionDrawable. In terms of graphics processing, the most commonly used is to draw some pictures, shapes or custom text content on a View, and these contents are currently implemented using Canvas, by obtaining the Canvas object in the View, draw some ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06T11/20G06T13/80G06T1/20
CPCG06T1/20G06T11/203G06T13/80
Inventor 杨希怀
Owner SHENZHEN HONGHE INNOVATION INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products