CN103593129B - Focus frame drawing method and system and touch device - Google Patents
Focus frame drawing method and system and touch device Download PDFInfo
- Publication number
- CN103593129B CN103593129B CN201210286447.0A CN201210286447A CN103593129B CN 103593129 B CN103593129 B CN 103593129B CN 201210286447 A CN201210286447 A CN 201210286447A CN 103593129 B CN103593129 B CN 103593129B
- Authority
- CN
- China
- Prior art keywords
- focus frame
- independent
- mask
- touch
- frame mask
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention is suitable for the technical field of Internet and provides a focus frame drawing method, a system and touch equipment, wherein the focus frame drawing method comprises the following steps: receiving a touch event and creating an independent focus frame mask; and if the touch point has an object needing a focus frame, drawing the needed focus frame on the independent focus frame cover so as to respond to the touch event. The invention draws the focus frame on the independent focus frame mask, so that the page content is not required to be redrawn when the focus frame is drawn, the system overhead is saved, the drawing response speed is very high, and the efficiency is extremely high.
Description
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a focus frame drawing method and system and touch equipment.
Background
When the user clicks on a web page link, the browser needs to give a feedback of the click (i.e., the focus box). In order to implement this function, it is common practice to determine whether a Render tree (a renderable element in each web page is called as Render, and a corresponding Render tree is generated after an HTML page is laid out) contains a Render that can respond to a click event on the touch point coordinates after a user touch event is acquired. If such a Render is included, a special attribute is set to the Render and the current screen is redrawn. In the process of drawing the traversal, if a Render with a focus frame attribute is encountered, a focus frame is drawn for the Render.
The technical scheme has the disadvantages that the focus frame and the webpage content are drawn on the screen together, and a certain time is needed for drawing one screen due to the limitation of the rendering speed of the system because the webpage content is more, so that the user has a feeling of obvious delay when the focus frame appears after touch, and the response speed is slow.
Disclosure of Invention
The embodiment of the invention aims to provide a method for drawing a focus frame, and aims to solve the problem of low drawing efficiency of the existing focus frame.
The embodiment of the invention is realized in such a way that a focus frame drawing method comprises the following steps:
receiving a touch event and creating an independent focus frame mask;
and if the touch point has an object needing the focus frame, drawing the needed focus frame on the independent focus frame cover.
An object of an embodiment of the present invention is to provide a focus frame drawing system, where the system includes:
the receiving and creating module is used for receiving the touch event and creating an independent focus frame mask;
and the judging and drawing module is used for judging whether the touch point has an object needing the focus frame, and if so, drawing the needed focus frame on the independent focus frame cover.
Another objective of an embodiment of the present invention is to provide a touch device, which includes a touch screen, and the touch device employs the above focus frame drawing system.
Compared with the prior art, the method and the system for drawing the focus frame provided by the embodiment of the invention have the advantages that the focus frame is drawn on the independent focus frame cover, so that the page content does not need to be drawn again when the focus frame is drawn, the system overhead is saved, the response speed of drawing can be correspondingly improved, and the efficiency is extremely high.
Drawings
FIG. 1 is a flowchart of an implementation of a method for drawing a focus frame according to an embodiment of the present invention;
FIG. 2 is a flow chart of the method optimization shown in FIG. 1;
fig. 3 is a schematic structural diagram of a focal point frame drawing system according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the embodiment of the invention, the focus frame is drawn on the independent focus frame mask, so that the page content does not need to be redrawn when the focus frame is drawn, the system overhead is saved, the drawing response speed is very high, and the drawing efficiency is extremely high.
The following describes the implementation of the present invention in detail by taking a browsing page provided by a wireless browser as an example.
Example one
Fig. 1 shows an implementation flow of a focus frame drawing method provided by an embodiment of the present invention, which is described in detail below.
In step S101, a touch event is received and an independent focus frame mask is created;
the embodiment of the invention firstly receives a user touch event, such as a webpage link clicked by a user, wherein the webpage link can be a text link, a picture link or a control. The touch event may be a touch event or a click event. Next, an independent focus frame mask is created that does not contain any web page content.
Preferably, the independent focus frame mask is transparent, the size of the independent focus frame mask is slightly larger than that of the screen, and each terminal operating system is recycled, so that the memory occupation is effectively saved. Typically, the separate focus frame mask is created over the page view for viewing.
In addition, after receiving the touch event, if a focus frame mask currently exists, the currently existing focus frame mask is removed, and then the independent focus frame mask is created, so that the system only has one focus frame mask, thereby avoiding confusion, as shown in fig. 2. For example, the user has selected control A to be in focus, and there is a focus frame mask with the focus frame of control A drawn on it. When the user clicks the link B, the currently existing focus frame mask (i.e., the focus frame mask of the control a) needs to be removed to make the focus frame of the control a disappear quickly, and then a new independent focus frame mask is created according to the attribute of the clicked link B, and the focus frame of the link B is drawn on the new independent focus frame mask.
In step S102, if there is an object requiring a focus frame at a touch point, the required focus frame is drawn on the independent focus frame mask, so as to respond to the touch event.
In the embodiment of the invention, the touch point is defined by click coordinates, for example, a user clicks (150, 200) the area, and an object (Render) needing a focus frame in the area is obtained by traversing a Render tree. It should be understood that the touch point is where a touch event occurs or where a click event occurs. The object (Render) requiring the focus frame here may be a picture or text. It should be noted that when drawing a desired focus frame in the independent focus frame mask, it is preferable to draw a focus frame according to the size and shape of the object, so as to improve the focus frame drawing efficiency. Thus, the method is particularly applicable to mobile internet browsers.
As another implementation flow of this embodiment, a touch event is received first, and if an object requiring a focus frame exists in a touch point, an independent focus frame mask is created; and drawing the required focus frame on the independent focus frame cover so as to respond to the touch event.
Example two
In contrast, the focus frame drawing system provided by the embodiment of the present invention includes a reception creation module 31 and a determination drawing module 32, as shown in fig. 3. Firstly, a receiving and creating module receives a touch event and creates an independent focus frame mask; and then judging whether the touch point has an object needing a focus frame by the judging and drawing module, if so, drawing the needed focus frame on the independent focus frame cover so as to respond to the touch event. Therefore, the webpage content (including all texts and pictures) does not need to be redrawn when the focus frame is drawn, the system overhead is saved, and the drawing response speed is very high.
Preferably, the system further comprises a removal module for removing a currently existing focus frame mask to create an independent focus frame mask. After the receiving and creating module receives the touch event, if the system currently has a focus frame mask, the currently existing focus frame mask is removed by the removing module, and then the receiving and creating module creates the independent focus frame mask, so that the system only has one focus frame mask, thereby avoiding confusion, as shown in fig. 2. For example, the user has selected control A to be in focus, and there is a focus frame mask with the focus frame of control A drawn on it. When the user clicks the link B, the currently existing focus frame mask (i.e., the focus frame mask of the control a) needs to be removed to make the focus frame of the control a disappear quickly, and then a new independent focus frame mask is created according to the attribute of the clicked link B, and the focus frame of the link B is drawn on the new independent focus frame mask.
In order to effectively save the memory occupation, the system further comprises a recycling module for recycling the independent focus frame mask. Thus, the system is particularly suitable for use in a mobile internet browser.
EXAMPLE III
The embodiment of the invention provides touch equipment which comprises a touch screen. The touch device adopts the focus frame drawing system described in the second embodiment.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (4)
1. A focus frame drawing method, characterized by comprising the steps of:
receiving a touch event;
if no focus frame mask exists currently, an independent focus frame mask is created; the independent focus frame mask does not contain web page content;
if the focus frame mask exists currently, removing the currently existing focus frame mask, and then creating the independent focus frame mask;
if the touch point has an object needing a focus frame, drawing the needed focus frame on the independent focus frame mask; the touch control point is defined by a click coordinate, and an object needing a focus frame in a click area is obtained by traversing a Render tree;
the independent focus frame mask is created over a page view;
the independent focus frame mask is transparent, the size of the independent focus frame mask is larger than that of the screen, and the independent focus frame mask is recycled.
2. The focus frame drawing method according to claim 1, wherein a desired focus frame is drawn in accordance with a size and a shape of the object.
3. A focus frame rendering system, the system comprising:
the receiving and creating module is used for creating an independent focus frame mask if the focus frame mask does not exist at present after receiving the touch event; the independent focus frame mask does not contain web page content;
a removing module, configured to remove a currently existing focus frame mask if the focus frame mask currently exists after receiving a touch event, so as to create the independent focus frame mask;
the judging and drawing module is used for judging whether the touch point has an object needing the focus frame, and if so, drawing the needed focus frame on the independent focus frame cover; the touch control point is defined by a click coordinate, and an object needing a focus frame in a click area is obtained by traversing a Render tree;
and the recycling module is used for recycling the independent focus frame masks.
4. A touch device comprising a touch screen, wherein the touch device employs the focus frame rendering system of claim 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210286447.0A CN103593129B (en) | 2012-08-13 | 2012-08-13 | Focus frame drawing method and system and touch device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210286447.0A CN103593129B (en) | 2012-08-13 | 2012-08-13 | Focus frame drawing method and system and touch device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103593129A CN103593129A (en) | 2014-02-19 |
CN103593129B true CN103593129B (en) | 2019-12-20 |
Family
ID=50083302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210286447.0A Active CN103593129B (en) | 2012-08-13 | 2012-08-13 | Focus frame drawing method and system and touch device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103593129B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109426409A (en) * | 2017-09-04 | 2019-03-05 | 中兴通讯股份有限公司 | A kind of method, apparatus of operation display, mobile terminal and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7127505B2 (en) * | 2003-08-15 | 2006-10-24 | Internet Associates, Llc | Methods, computer systems, and computer readable media for generating displays of sets of network addresses with status indicators |
CN101710936A (en) * | 2009-12-16 | 2010-05-19 | 中兴通讯股份有限公司 | IPTV printscreen realization method and device based on set-top box |
JP5604921B2 (en) * | 2010-03-19 | 2014-10-15 | セイコーエプソン株式会社 | Image display system, image display method, and image display apparatus |
CN102541554B (en) * | 2011-12-27 | 2014-06-25 | 重庆新媒农信科技有限公司 | Method for realizing dynamic transparent specially good display effect of input box |
-
2012
- 2012-08-13 CN CN201210286447.0A patent/CN103593129B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN103593129A (en) | 2014-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10339209B2 (en) | Webpage display method and device | |
CN105975576B (en) | Terminal content adaptive display method and device and terminal | |
CN104778239B (en) | A kind of built-in browser focus querying method | |
WO2015196822A1 (en) | Method and device for adapting webpage to screen layout | |
KR20140012664A (en) | Method for rearranging web page | |
US20140075290A1 (en) | Window switching method and apparatus | |
CN103577466A (en) | Method and device for displaying webpage content in browser | |
US9117314B2 (en) | Information output apparatus, method, and recording medium for displaying information on a video display | |
CN105389159A (en) | Picture rendering method, device and mobile terminal | |
CN104182430A (en) | Method and device for displaying image in text message | |
CN112685671A (en) | Page display method, device, equipment and storage medium | |
CN103176993B (en) | A kind of content presenting device and method | |
US20140092084A1 (en) | Webpage display method and apparatus | |
US20170169126A1 (en) | Method and device of displaying webpage | |
CN103593129B (en) | Focus frame drawing method and system and touch device | |
EP3043251A1 (en) | Method of displaying content and electronic device implementing same | |
CN105389308A (en) | Display processing method and device for web pages | |
CN103236042A (en) | Self-adaptive picture processing method and device | |
US8867837B2 (en) | Detecting separator lines in a web page | |
CN105589883B (en) | Method and device for displaying page elements of webpage | |
CN103744867A (en) | Method and device for setting Web page backgrounds and browser | |
CN104281562A (en) | Electronic document processing method and device | |
CN107025111A (en) | The method and system that a kind of browser target pages entire screen switch is shown | |
WO2013026326A1 (en) | Method and terminal for implementing cache display | |
CN102855265A (en) | System for browsing and downloading webpage picture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |