WO2015192574A1 - 基于安卓系统的曲线绘制处理方法、装置及终端 - Google Patents

基于安卓系统的曲线绘制处理方法、装置及终端 Download PDF

Info

Publication number
WO2015192574A1
WO2015192574A1 PCT/CN2014/089362 CN2014089362W WO2015192574A1 WO 2015192574 A1 WO2015192574 A1 WO 2015192574A1 CN 2014089362 W CN2014089362 W CN 2014089362W WO 2015192574 A1 WO2015192574 A1 WO 2015192574A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
predetermined threshold
coordinate
exceeds
distance
Prior art date
Application number
PCT/CN2014/089362
Other languages
English (en)
French (fr)
Inventor
孙怡
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015192574A1 publication Critical patent/WO2015192574A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means

Definitions

  • the present invention relates to the field of communications, and in particular to a method, an apparatus, and a terminal for processing a curve based on an Android (Android) system.
  • Android Android
  • Android's drawing frame provides a lot of graphics, such as lines, triangles, circles, etc., but these graphics are not drawn in real time according to the trajectory of the user's finger movement.
  • Android's drawing framework has used techniques such as double buffering to improve drawing efficiency, but it is slower to draw in real time on some lower-end devices.
  • the invention provides a curve drawing processing method, device and terminal based on Android system, so as to at least solve the problem that the drawing frame drawing in Android is inefficient in the related art.
  • a method for drawing a curve based on an Android system comprising: receiving a first coordinate of a first point input on a device screen; detecting a second point input on the device screen Determining whether the distance between the first point and the second point exceeds a predetermined threshold; if the determination result is yes, based on the first coordinate and the second point of the first point The second coordinate of the point draws a curve.
  • determining whether the distance between the first point and the second point exceeds the predetermined threshold comprises: determining whether a difference between an abscissa of the first point and an abscissa of the second point exceeds a horizontal a predetermined threshold value, and whether a difference between the ordinate of the first point and the ordinate of the second point exceeds a predetermined threshold of the ordinate; if the determination result is yes, the first point is determined The distance between the second points exceeds the predetermined threshold, wherein the predetermined threshold includes the abscissa predetermined threshold and the ordinate predetermined threshold.
  • determining whether the distance between the first point and the second point exceeds the predetermined threshold comprises: acquiring the first point and the first according to the first coordinate and the second coordinate a straight line distance between two points; determining whether the straight line distance exceeds the predetermined threshold; if the determination result is yes, determining that the distance between the first point and the second point exceeds the predetermined threshold .
  • the method further comprises: refreshing the device screen.
  • the predetermined threshold is 5 units.
  • a curve rendering processing apparatus based on an Android system, comprising: a receiving module configured to receive a first coordinate of a first point input on a device screen; and a detecting module configured to detect The second coordinate of the second point input by the device screen; the determining module is configured to determine whether the distance between the first point and the second point exceeds a predetermined threshold; and the drawing module is configured to be in the determining module If the result of the determination is YES, the curve is drawn based on the first coordinate of the first point and the second coordinate of the second point.
  • the determining module includes: a first determining unit, configured to determine whether a difference between an abscissa of the first point and an abscissa of the second point exceeds a predetermined threshold of an abscissa, and the first point Whether the difference between the ordinate and the ordinate of the second point exceeds a predetermined threshold of the ordinate; the first determining unit is configured to determine the first point and the case that the determination result of the first determining unit is YES The distance between the second points exceeds the predetermined threshold, wherein the predetermined threshold includes the abscissa predetermined threshold and the ordinate predetermined threshold.
  • the determining module includes: an acquiring unit, configured to acquire a linear distance between the first point and the second point according to the first coordinate and the second coordinate; and a second determining unit, Set to determine whether the linear distance exceeds the predetermined threshold; the second determining unit is configured to determine the first point and the second point if the determination result of the second determining unit is YES The distance between them exceeds the predetermined threshold.
  • the apparatus further comprises: a refresh module configured to refresh the device screen.
  • a terminal comprising the apparatus of any of the above.
  • FIG. 1 is a flowchart of a curve drawing processing method based on an Android system according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a curve rendering processing apparatus based on an Android system according to an embodiment of the present invention
  • FIG. 3 is a block diagram 1 of a preferred structure of the determining module 26 in the curve drawing processing device based on the Android system according to an embodiment of the present invention
  • FIG. 4 is a block diagram 2 of a preferred structure of the judging module 26 in the graph rendering processing device based on the Android system according to an embodiment of the present invention
  • FIG. 5 is a block diagram showing a preferred structure of a curve rendering processing apparatus based on an Android system according to an embodiment of the present invention
  • FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present invention.
  • Figure 7 is a schematic illustration of a drawing scheme in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a curve drawing processing method based on the Android system according to an embodiment of the present invention. As shown in FIG. 1 , the flow includes the following steps. :
  • Step S102 receiving a first coordinate of a first point input on a device screen
  • Step S104 detecting a second coordinate of the second point input on the device screen
  • Step S106 determining whether the distance between the first point and the second point exceeds a predetermined threshold, wherein the predetermined threshold may be determined according to a specific device, for example, the predetermined threshold may be 5 units;
  • Step S108 if the result of the determination is YES, the curve is drawn based on the first coordinate of the first point and the second coordinate of the second point.
  • the difference between the coordinates of the point and the point may be directly determined: determining the abscissa of the first point and Whether the difference between the abscissa of the second point exceeds the predetermined threshold of the abscissa, and whether the difference between the ordinate of the first point and the ordinate of the second point exceeds a predetermined threshold of the ordinate; if the above judgment result is yes, the determination is made
  • the distance between the first point and the second point exceeds a predetermined threshold, wherein the predetermined threshold includes an abscissa predetermined threshold and an ordinate predetermined threshold.
  • determining whether the distance between the first point and the second point exceeds a predetermined threshold may further adopt a process of: obtaining a linear distance between the first point and the second point according to the first coordinate and the second coordinate; It is determined whether the linear distance exceeds a predetermined threshold; if the determination result is YES, it is determined that the distance between the first point and the second point exceeds a predetermined threshold. It should be noted that determining whether the distance between the first point and the second point exceeds a predetermined threshold may be selected according to a specific situation.
  • the method further comprises: refreshing the device screen, so that the process of the drawing is clear and clear.
  • a curve drawing processing device based on the Android system is further provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a structural block diagram of a curve rendering processing device based on an Android system according to an embodiment of the present invention. As shown in FIG. 2, the device includes a receiving module 22, a detecting module 24, a determining module 26, and a drawing module 28. The device is described.
  • the receiving module 22 is configured to receive the first coordinate of the first point input on the device screen; the detecting module 24 is connected to the receiving module 22, and is configured to detect the second coordinate of the second point input on the device screen; the determining module 26, connected to the detecting module 24, configured to determine whether the distance between the first point and the second point exceeds a predetermined threshold; the drawing module 28 is connected to the determining module 26, and is set to be YES at the determining module. In the case, the curve is drawn based on the first coordinate of the first point and the second coordinate of the second point.
  • the judging module 26 includes a first judging unit 32 and a first determining unit 34.
  • the determination module 26 will be described below.
  • the first determining unit 32 is configured to determine whether the difference between the abscissa of the first point and the abscissa of the second point exceeds a predetermined threshold of the abscissa, and whether the difference between the ordinate of the first point and the ordinate of the second point exceeds the vertical a predetermined threshold value; the first determining unit 34 is connected to the first determining unit 32, and is configured to determine that the result of the first determining unit is In the case of YES, it is determined that the distance between the first point and the second point exceeds a predetermined threshold, wherein the predetermined threshold includes an abscissa predetermined threshold and an ordinate predetermined threshold.
  • the judging module 26 includes an obtaining unit 42, a second judging unit 44, and a second The determining unit 46 is described below with respect to the determining module 26.
  • the obtaining unit 42 is configured to acquire a linear distance between the first point and the second point according to the first coordinate and the second coordinate; the second determining unit 44 is connected to the obtaining unit 42 and configured to determine whether the linear distance exceeds a predetermined time.
  • the second determination unit 46 is connected to the second determination unit 44, and is configured to determine that the distance between the first point and the second point exceeds a predetermined threshold if the determination result of the second determination unit 44 is YES.
  • FIG. 5 is a block diagram of a preferred structure of a curve rendering processing device based on an Android system according to an embodiment of the present invention. As shown in FIG. 5, the device includes a refresh module 52 in addition to all the modules shown in FIG. The refresh module 52 will be described.
  • the refresh module 52 is coupled to the rendering module 28 and configured to refresh the device screen.
  • FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 6, the terminal 60 includes the curve rendering processing device 62 of any of the above.
  • a drawing scheme based on the Android drawing frame which mainly adopts the following processing: the previous coordinate position and the current coordinate position input by the user's finger are performed. Compare, if less than a certain empirical value, the current point is not drawn, otherwise the curve between the current point and the previous point is drawn, and the painting is refreshed. In this way, the drawing is performed cyclically, so that the coordinate position moved by the finger does not draw the coordinates of each time, and the purpose of improving the drawing efficiency is achieved.
  • the effect is more obvious in improving the efficiency and smoothness of the user's real-time drawing curve.
  • the solution can include the following processing steps:
  • step S3 if the difference is less than a certain empirical value, ignore the current coordinate value, continue to obtain the coordinate value of the next finger movement, repeat step S2;
  • FIG. 7 is a schematic diagram of a drawing scheme according to a preferred embodiment of the present invention. As shown in FIG. 7, p1 and p2 are two points in the drawing process, and the drawing scheme includes the following processing:
  • the Android system detects the second point of the finger movement, and records the coordinate value p2 (x2, y2) of the second point, respectively calculating the x-axis difference and the y-axis of the two coordinate points. Difference, resulting in an x-axis difference ⁇ x and a y-axis difference ⁇ y;
  • Step S3 if ⁇ x is less than a certain empirical value (for example, the first empirical value) and ⁇ y is smaller than a certain empirical value (for example, the second empirical value), the current coordinate value is ignored, and the coordinate value of the next point is continuously obtained, and the repetition is repeated.
  • the value of the above empirical value can be obtained through continuous data screening, thereby selecting an appropriate value to achieve a higher drawing efficiency and a smoother drawing curve.
  • the empirical value may be 5 in the application-electronic whiteboard, which can make the drawn curve relatively smooth and draw relatively smooth on the low-end device.
  • the device to be used is not limited to a mobile phone, and may be any terminal device that uses Android as an operating system.
  • it may be a PAD of an Android system or the like.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

本发明提供了一种基于安卓系统的曲线绘制处理方法、装置及终端,其中,该方法包括:接收在设备屏幕输入的第一点的第一坐标;检测到在设备屏幕输入的第二点的第二坐标;判断第一点与第二点之间的距离是否超过预定阈值;在判断结果为是的情况下,基于第一点的第一坐标和第二点的第二坐标绘制曲线,通过本发明,解决了在相关技术中,在Android的画图框架绘图存在效率低下的问题,进而达到了有效提高绘图效率的效果。

Description

基于安卓系统的曲线绘制处理方法、装置及终端 技术领域
本发明涉及通信领域,具体而言,涉及一种基于安卓(Android)系统的曲线绘制处理方法、装置及终端。
背景技术
Android的画图框架提供了很多图形的绘制,比如,直线、三角形、圆形等,但这些图形并不是根据用户手指移动的轨迹而实时绘制的曲线。Android的画图框架已经使用了诸如双缓冲技术以提高画图的效率,但这在一些比较低端的设备上实时绘制还是比较缓慢的。
因此,在相关技术中,在Android的画图框架绘图存在效率低下的问题。
发明内容
本发明提供了一种基于安卓系统的曲线绘制处理方法、装置及终端,以至少解决在相关技术中,在Android的画图框架绘图存在效率低下的问题。
根据本发明的一个方面,提供了一种基于Android系统的曲线绘制处理方法,包括:接收在设备屏幕输入的第一点的第一坐标;检测到在所述设备屏幕输入的第二点的第二坐标;判断所述第一点与所述第二点之间的距离是否超过预定阈值;在判断结果为是的情况下,基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线。
优选地,判断所述第一点与所述第二点之间的距离是否超过所述预定阈值包括:判断所述第一点的横坐标与所述第二点的横坐标之差是否超过横坐标预定阈值,以及所述第一点的纵坐标与所述第二点的纵坐标之差是否超过纵坐标预定阈值;在上述判断结果均为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值,其中,所述预定阈值包括所述横坐标预定阈值和纵坐标预定阈值。
优选地,判断所述第一点与所述第二点之间的距离是否超过所述预定阈值包括:依据所述第一坐标和所述第二坐标,获取所述第一点与所述第二点之间的直线距离;判断所述直线距离是否超过所述预定阈值;在判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值。
优选地,在基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线之后,还包括:对所述设备屏幕进行刷新。
优选地,所述预定阈值为5个单位。
根据本发明的另一方面,提供了一种基于安卓系统的曲线绘制处理装置,包括:接收模块,设置为接收在设备屏幕输入的第一点的第一坐标;检测模块,设置为检测到在所述设备屏幕输入的第二点的第二坐标;判断模块,设置为判断所述第一点与所述第二点之间的距离是否超过预定阈值;绘制模块,设置为在所述判断模块的判断结果为是的情况下,基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线。
优选地,所述判断模块包括:第一判断单元,设置为判断所述第一点的横坐标与所述第二点的横坐标之差是否超过横坐标预定阈值,以及所述第一点的纵坐标与所述第二点的纵坐标之差是否超过纵坐标预定阈值;第一确定单元,设置为在所述第一判断单元的判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值,其中,所述预定阈值包括所述横坐标预定阈值和纵坐标预定阈值。
优选地,所述判断模块包括:获取单元,设置为依据所述第一坐标和所述第二坐标,获取所述第一点与所述第二点之间的直线距离;第二判断单元,设置为判断所述直线距离是否超过所述预定阈值;第二确定单元,设置为在所述第二判断单元的判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值。
优选地,该装置还包括:刷新模块,设置为对所述设备屏幕进行刷新。
根据本发明的再一方面,提供了一种终端,包括上述任一项所述的装置。
通过本发明,采用接收在设备屏幕输入的第一点的第一坐标;检测到在所述设备屏幕输入的第二点的第二坐标;判断所述第一点与所述第二点之间的距离是否超过预定阈值;在判断结果为是的情况下,基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线,解决了在相关技术中,在Android的画图框架绘图存在效率低下的问题,进而达到了有效提高绘图效率的效果。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的基于安卓系统的曲线绘制处理方法的流程图;
图2是根据本发明实施例的基于安卓系统的曲线绘制处理装置的结构框图;
图3是根据本发明实施例的基于安卓系统的曲线绘制处理装置中判断模块26的优选结构框图一;
图4是根据本发明实施例的基于安卓系统的曲线绘制处理装置中判断模块26的优选结构框图二;
图5是根据本发明实施例的基于安卓系统的曲线绘制处理装置的优选结构框图;
图6是根据本发明实施例的终端的结构框图;
图7是根据本发明优选实施方式的绘画方案示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
在本实施例中提供了一种基于安卓系统的曲线绘制处理方法,图1是根据本发明实施例的基于安卓系统的曲线绘制处理方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,接收在设备屏幕输入的第一点的第一坐标;
步骤S104,检测到在设备屏幕输入的第二点的第二坐标;
步骤S106,判断第一点与第二点之间的距离是否超过预定阈值,其中,该预定阈值可以依据具体设备而定,例如,该预定阈值可以为5个单位;
步骤S108,在判断结果为是的情况下,基于第一点的第一坐标和第二点的第二坐标绘制曲线。
通过上述步骤,依据点与点之间的距离是否超过预定距离来决定是否在点与点之间绘制曲线,相对于相关技术中,对设备屏幕上检测到的每个点均进行绘制,导致存在效率低下的问题,采用该方法通过有效地控制了绘图所采用的点,不仅提高了绘图效率,而且在一定程度上间接地实现了绘制曲线的平滑度。
在判断第一点与第二点之间的距离是否超过预定阈值时,可以采用多种方式,例如,可以直接依据点与点的坐标之间的差别来判断:判断第一点的横坐标与第二点的横坐标之差是否超过横坐标预定阈值,以及第一点的纵坐标与第二点的纵坐标之差是否超过纵坐标预定阈值;在上述判断结果均为是的情况下,确定第一点与第二点之间的距离超过预定阈值,其中,该预定阈值包括横坐标预定阈值和纵坐标预定阈值。又例如,判断第一点与第二点之间的距离是否超过预定阈值还可以采用以下处理:依据第一坐标和第二坐标,获取第一点与第二点之间的直线距离;之后,判断直线距离是否超过预定阈值;在判断结果为是的情况下,确定第一点与第二点之间的距离超过预定阈值。需要说明的是,上述判断第一点与第二点之间的距离是否超过预定阈值可以依据具体情况而选择。
较佳地,在基于第一点的第一坐标和第二点的第二坐标绘制曲线之后,还包括:对设备屏幕进行刷新,使得绘图的进程明显,清晰。
在本实施例中还提供了一种基于安卓系统的曲线绘制处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的基于安卓系统的曲线绘制处理装置的结构框图,如图2所示,该装置包括接收模块22、检测模块24、判断模块26和绘制模块28,下面对该装置进行说明。
接收模块22,设置为接收在设备屏幕输入的第一点的第一坐标;检测模块24,连接至上述接收模块22,设置为检测到在设备屏幕输入的第二点的第二坐标;判断模块26,连接至上述检测模块24,设置为判断第一点与第二点之间的距离是否超过预定阈值;绘制模块28,连接至上述判断模块26,设置为在判断模块的判断结果为是的情况下,基于第一点的第一坐标和第二点的第二坐标绘制曲线。
图3是根据本发明实施例的基于安卓系统的曲线绘制处理装置中判断模块26的优选结构框图一,如图3所示,该判断模块26包括第一判断单元32和第一确定单元34,下面对该判断模块26进行说明。
第一判断单元32,设置为判断第一点的横坐标与第二点的横坐标之差是否超过横坐标预定阈值,以及第一点的纵坐标与第二点的纵坐标之差是否超过纵坐标预定阈值;第一确定单元34,连接至上述第一判断单元32,设置为在第一判断单元的判断结果为 是的情况下,确定第一点与第二点之间的距离超过预定阈值,其中,预定阈值包括横坐标预定阈值和纵坐标预定阈值。
图4是根据本发明实施例的基于安卓系统的曲线绘制处理装置中判断模块26的优选结构框图二,如图4所示,该判断模块26包括获取单元42、第二判断单元44和第二确定单元46,下面对该判断模块26进行说明。
获取单元42,设置为依据第一坐标和第二坐标,获取第一点与第二点之间的直线距离;第二判断单元44,连接至上述获取单元42,设置为判断直线距离是否超过预定阈值;第二确定单元46,连接至上述第二判断单元44,设置为在第二判断单元44的判断结果为是的情况下,确定第一点与第二点之间的距离超过预定阈值。
图5是根据本发明实施例的基于安卓系统的曲线绘制处理装置的优选结构框图,如图5所示,该装置除包括图2所示的所有模块外,还包括刷新模块52,下面对该刷新模块52进行说明。
刷新模块52,连接至上述绘制模块28,设置为对设备屏幕进行刷新。
图6是根据本发明实施例的终端的结构框图,如图6所示,该终端60包括上述任一项的曲线绘制处理装置62。
针对相关技术中画图效率低的问题,在本实施例中,提供了一种基于Android画图框架的绘画方案,该方案主要采用以下处理:将用户手指输入的前一次坐标位置和当前的坐标位置进行比较,如果小于某一个经验值就不进行绘制当前点,否则就绘制当前点和前一个点之间的曲线,并进行刷新绘画。这样循环往复的进行绘制,使得手指移动过的坐标位置并不是将每一次的坐标都进行绘制,达到了提高绘制效率的目的。特别地,对于Android低端设备,在提高用户实时绘制曲线的效率和平滑度上效果更为明显。
该方案可以包括以下处理步骤:
S1,记录第一次手指触摸屏幕的坐标值;
S2,记录每次手指移动的坐标值,将本次坐标值与前一次坐标值进行x轴和y轴方向的差值判断;
S3,如果差值小于某个经验值,则忽略本次坐标值,继续获取下一个手指移动的坐标值,重复步骤S2;
S4,如果差值大于某个经验值,则绘制前一次坐标值到本次坐标值之间的曲线;
S5,从步骤S2开始重复执行。
下面对本发明优选实施例进行说明。
图7是根据本发明优选实施方式的绘画方案示意图,如图7所示,p1和p2是绘制过程中的两个点,该绘画方案包括如下处理:
S1,手指按住屏幕不动,记录第一个点的坐标值p1(x1,y1);
S2,此时移动手指,Android系统检测到手指移动的第二个点,并记录第二个点的坐标值p2(x2,y2),分别计算这两个坐标点的x轴差值和y轴差值,得出x轴差值Δx和y轴差值Δy;
S3,如果Δx小于某个经验值(例如,第一经验值)并且Δy小于某个经验值(例如,第二经验值),则忽略本次坐标值,继续获取下一个点的坐标值,重复步骤S2;
S4,如果Δx大于某个经验值并且Δy大于某个经验值,则通过调用Android系统绘制曲线的方法quadTo()函数绘制这两个点之间的曲线;
S5,从步骤S2开始重复执行。
需要说明的是,上述经验值的取值,可以通过不断的数据筛选得到,从而选出一个适当的值,以达到绘制效率较高、绘制的曲线较平滑的效果。例如,在本实施例中,较优地,可以在应用-电子白板中该经验值取值为5,该值能使得绘制的曲线比较平滑并且在低端的设备上绘制比较流畅。
另外,上述仅以手机设备为例进行了说明,但使用的设备不局限于手机,只要是以Android为操作系统的终端设备都可以,比如,还可以是Android系统的PAD等。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
如上所述,通过上述实施例及优选实施方式,解决了在相关技术中,在Android的画图框架绘图存在效率低下的问题,进而达到了有效提高绘图效率的效果。

Claims (10)

  1. 一种基于安卓系统的曲线绘制处理方法,包括:
    接收在设备屏幕输入的第一点的第一坐标;
    检测到在所述设备屏幕输入的第二点的第二坐标;
    判断所述第一点与所述第二点之间的距离是否超过预定阈值;
    在判断结果为是的情况下,基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线。
  2. 根据权利要求1所述的方法,其中,判断所述第一点与所述第二点之间的距离是否超过所述预定阈值包括:
    判断所述第一点的横坐标与所述第二点的横坐标之差是否超过横坐标预定阈值,以及所述第一点的纵坐标与所述第二点的纵坐标之差是否超过纵坐标预定阈值;
    在上述判断结果均为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值,其中,所述预定阈值包括所述横坐标预定阈值和纵坐标预定阈值。
  3. 根据权利要求1所述的方法,其中,判断所述第一点与所述第二点之间的距离是否超过所述预定阈值包括:
    依据所述第一坐标和所述第二坐标,获取所述第一点与所述第二点之间的直线距离;
    判断所述直线距离是否超过所述预定阈值;
    在判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值。
  4. 根据权利要求1所述的方法,其中,在基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线之后,还包括:
    对所述设备屏幕进行刷新。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述预定阈值为5个单位。
  6. 一种基于安卓系统的曲线绘制处理装置,包括:
    接收模块,设置为接收在设备屏幕输入的第一点的第一坐标;
    检测模块,设置为检测到在所述设备屏幕输入的第二点的第二坐标;
    判断模块,设置为判断所述第一点与所述第二点之间的距离是否超过预定阈值;
    绘制模块,设置为在所述判断模块的判断结果为是的情况下,基于所述第一点的所述第一坐标和所述第二点的所述第二坐标绘制曲线。
  7. 根据权利要求6所述的装置,其中,所述判断模块包括:
    第一判断单元,设置为判断所述第一点的横坐标与所述第二点的横坐标之差是否超过横坐标预定阈值,以及所述第一点的纵坐标与所述第二点的纵坐标之差是否超过纵坐标预定阈值;
    第一确定单元,设置为在所述第一判断单元的判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值,其中,所述预定阈值包括所述横坐标预定阈值和纵坐标预定阈值。
  8. 根据权利要求6所述的装置,其中,所述判断模块包括:
    获取单元,设置为依据所述第一坐标和所述第二坐标,获取所述第一点与所述第二点之间的直线距离;
    第二判断单元,设置为判断所述直线距离是否超过所述预定阈值;
    第二确定单元,设置为在所述第二判断单元的判断结果为是的情况下,确定所述第一点与所述第二点之间的距离超过所述预定阈值。
  9. 根据权利要求6所述的装置,其中,还包括:
    刷新模块,设置为对所述设备屏幕进行刷新。
  10. 一种终端,包括权利要求6至9中任一项所述的装置。
PCT/CN2014/089362 2014-06-16 2014-10-23 基于安卓系统的曲线绘制处理方法、装置及终端 WO2015192574A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410268685.8 2014-06-16
CN201410268685.8A CN105320434A (zh) 2014-06-16 2014-06-16 基于安卓系统的曲线绘制处理方法、装置及终端

Publications (1)

Publication Number Publication Date
WO2015192574A1 true WO2015192574A1 (zh) 2015-12-23

Family

ID=54934799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089362 WO2015192574A1 (zh) 2014-06-16 2014-10-23 基于安卓系统的曲线绘制处理方法、装置及终端

Country Status (2)

Country Link
CN (1) CN105320434A (zh)
WO (1) WO2015192574A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428704A (zh) * 2020-03-02 2020-07-17 云知声智能科技股份有限公司 一种用于指读系统判断点读和划读的方法及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912257B (zh) * 2016-04-11 2019-03-05 腾讯科技(深圳)有限公司 图像混合处理方法和装置
CN112306346B (zh) * 2020-10-28 2021-08-31 广州朗国电子科技有限公司 三角尺作图方法、装置、存储介质及电子白板
CN113610944B (zh) * 2021-07-30 2024-06-14 新线科技有限公司 一种线条绘制方法、装置、设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135831A (zh) * 2010-12-31 2011-07-27 华为终端有限公司 控制触摸屏线条显示的方法及装置
CN102520849A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW524352U (en) * 1999-11-10 2003-03-11 U Teh Internat Corp Touch control device with pressure hand-written pen
CN102663033A (zh) * 2012-03-23 2012-09-12 汉海信息技术(上海)有限公司 采用手绘方式搜索地图指定区域兴趣点的方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135831A (zh) * 2010-12-31 2011-07-27 华为终端有限公司 控制触摸屏线条显示的方法及装置
CN102520849A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428704A (zh) * 2020-03-02 2020-07-17 云知声智能科技股份有限公司 一种用于指读系统判断点读和划读的方法及系统
CN111428704B (zh) * 2020-03-02 2023-06-16 云知声智能科技股份有限公司 一种用于指读系统判断点读和划读的方法及系统

Also Published As

Publication number Publication date
CN105320434A (zh) 2016-02-10

Similar Documents

Publication Publication Date Title
US20180247132A1 (en) System and method for person counting in image data
WO2015192574A1 (zh) 基于安卓系统的曲线绘制处理方法、装置及终端
US9377943B2 (en) Method and apparatus for outputting display data based on a touch operation on a touch panel
US20160349983A1 (en) Terminal screen shot method and terminal
WO2022166927A1 (zh) 基于远程桌面的光标显示方法、装置、介质及电子设备
US20150234522A1 (en) Touch event scan method, electronic device and storage medium
CN103631435B (zh) 用于控制触摸功能的方法及其电子装置
CA2925390A1 (en) Methods and terminal devices for displaying interface content using multiple grids
US10448879B2 (en) Skin condition detection method and electronic device
EP3104305A3 (en) Apparatus and method of reducing storage of handwritten strokes
US11422660B2 (en) Input device, input method and program
WO2017101496A1 (zh) 一种手势识别方法及装置
US20170115796A1 (en) Method, device and terminal apparatus for recognizing a multi-finger pinching-in or pinching-out gesture
CN109191547B (zh) 元素吸附方法、装置、设备和存储介质
US20150186731A1 (en) Full-automatic detection method and system for static characteristic information in dynamic image
US9824267B2 (en) Writing board detection and correction
CN105046661A (zh) 一种提升视频美颜效率的方法、装置及智能终端
US9747708B2 (en) Method for generating writing data and an electronic device thereof
CN103870197A (zh) 一种处理图片的方法及装置
CN103984478B (zh) 一种动态图标的展示方法及系统
CN103793141A (zh) 一种控制图标旋转的实现方法及系统
CN110007838B (zh) 擦除控件的处理方法、装置和设备
CN103236042A (zh) 图片自适应处理方法及装置
TW201530423A (zh) 觸控方法及觸控系統
CN104731396B (zh) 一种魔术笔及其显示控制方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14895465

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14895465

Country of ref document: EP

Kind code of ref document: A1