CN113673200A - Text display method and text display device - Google Patents
Text display method and text display device Download PDFInfo
- Publication number
- CN113673200A CN113673200A CN202010402996.4A CN202010402996A CN113673200A CN 113673200 A CN113673200 A CN 113673200A CN 202010402996 A CN202010402996 A CN 202010402996A CN 113673200 A CN113673200 A CN 113673200A
- Authority
- CN
- China
- Prior art keywords
- text
- display screen
- target display
- displayed
- position information
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/106—Display of layout of documents; Previewing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention relates to a text display method, which comprises the following steps: acquiring a pre-display text; determining text position information according to the pre-displayed text; acquiring area position information of a target display area of a target display screen; generating a text offset according to the text position information and the region position information; and shifting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen. According to the embodiment of the invention, after the pre-displayed text is offset through the text offset, a completely centered state can be achieved.
Description
Technical Field
The present invention relates to the field of text and image technologies, and in particular, to a text display method and a text display apparatus.
Background
In the LED industry, programs are usually produced at a server and then sent to a terminal for playing, and when a program is a text, the text needs to be played centrally on a display screen of the terminal, so that a user has a good visual experience effect;
however, since the whole character needs to be drawn when the character is played on the terminal display screen, the character needs to be obtained from the character library, and the line height of the whole character is determined from the highest vertex line to the lowest vertex line of the character, that is, the whole character line height is determined by two lines of the highest vertex line and the lowest vertex line, and when the character is called from the character library, the whole character is drawn by the line height. However, some characters called from the character library have a significantly lower state relative to the highest and lowest vertex lines, that is, the characters observed by the user on the display screen are in a lower position, so that the whole characters are not in a central position, which brings a bad experience to the user.
Disclosure of Invention
Accordingly, to overcome the defects and shortcomings of the prior art, embodiments of the present invention provide a text display method, a text display apparatus, a text display system, and a computer-readable storage medium.
In one aspect, a text display method provided in an embodiment of the present invention includes: acquiring a pre-display text; determining text position information according to the pre-displayed text; acquiring area position information of a target display area of a target display screen; generating a text offset according to the text position information and the region position information; and shifting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen.
In the prior art, a character needs to be obtained from a character library, and the line height of the whole character is determined from the highest vertex line to the lowest vertex line of the character, that is, the line height of the whole character is determined through two lines, namely the highest vertex line and the lowest vertex line, and when the character is called from the character library, the whole character is drawn through the line height. However, for the topmost dot line and the bottommost dot line, some characters called from the character library are in an obviously downward state, that is, the characters observed by the user in the display screen are in a downward position, and the characters displayed on the display screen after centering alignment are in an obviously downward state, that is, the characters seen by the user from the display screen are not in a centered position of the display screen.
In an embodiment of the present invention, the determining text position information according to the pre-displayed text includes: scanning the pre-displayed text to obtain boundary information of the pre-displayed text; and calculating to obtain a text center coordinate as the text position information based on the boundary information of the pre-displayed text.
In an embodiment of the present invention, the acquiring area position information of a target display area of a target display screen includes: acquiring the length and the height of the target display area; calculating area center coordinates based on the length and the height of the target display area as the area position information.
In an embodiment of the present invention, before the obtaining the length and the height of the target display area, the method further includes: and in response to the target display screen being a rectangular display screen, taking the effective display area of the target display screen as the target display area.
In an embodiment of the present invention, before the obtaining the length and the height of the target display area, the method includes: in response to the target display screen being a non-rectangular display screen, determining the target display area based on an effective display area of the target display screen and a target side length of the pre-displayed text
In an embodiment of the present invention, after the shifting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen, the method further includes: responding to the input operation of a user on the man-machine interaction interface to obtain a second text offset; shifting the pre-displayed text based on the second text offset to again change the display position of the pre-displayed text on the target display screen.
On the other hand, an embodiment of the present invention provides a text display device, including: the text acquisition module is used for acquiring a pre-display text; the information determining module is used for determining text position information according to the pre-displayed text; the information acquisition module is used for acquiring the area position information of a target display area of the target display screen; the offset generation module is used for generating text offset according to the text position information and the region position information; and the text offset module is used for offsetting the pre-displayed text according to the text offset so as to change the display position of the pre-displayed text on the target display screen.
In one embodiment of the present invention, the information determining module includes: the text scanning unit is used for scanning the pre-displayed text to obtain boundary information of the pre-displayed text; and the coordinate calculation unit is used for calculating a text center coordinate based on the boundary information of the pre-displayed text to be used as the text position information.
In one embodiment of the present invention, the information obtaining module includes: a size acquisition unit for acquiring the length and height of the target display area; and the coordinate calculation unit is used for calculating the center coordinates of the area based on the length and the height of the target display area to obtain the area position information.
In an embodiment of the present invention, the text display device further includes: and the operation response module is used for responding to the input operation of a user on a human-computer interaction interface, obtaining a second text offset, and offsetting the pre-displayed text based on the second text offset so as to change the display position of the pre-displayed text on the target display screen again.
In another aspect, an embodiment of the present invention provides a text display system, including: a processor and a memory coupled to the processor; wherein the memory stores instructions for execution by the processor, and the instructions cause the processor to perform operations to perform any of the foregoing text display methods.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, which is a non-volatile memory and stores program code, and when the program code is executed by a computer, the computer implements any one of the text display methods.
As can be seen from the above, the above technical features of the present invention may have one or more of the following advantages:
1. according to the method provided by the embodiment of the invention, the text position information is firstly acquired, then the display area information of the display screen is acquired, the text offset is generated through the text position information and the area position information, and then the text is offset through the text offset, so that the text can be in a completely centered state, and the visual experience of a user is increased.
2. And opening the second text offset for the user, and changing the position of the text displayed in the display screen by manually adjusting the second text offset to meet the requirements of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a text display method according to a first embodiment of the present invention.
Fig. 2 is a flowchart illustrating a detailed step S102 of the text display method shown in fig. 1 according to the first embodiment of the present invention.
Fig. 3 is a flowchart illustrating a detailed step S103 of the text display method shown in fig. 1 according to the first embodiment of the present invention.
Fig. 4 is a flowchart illustrating a detailed step S103 of the text display method shown in fig. 1 according to the first embodiment of the present invention.
Fig. 5 is a flowchart illustrating steps of the text display method shown in fig. 1 after step S105 according to the first embodiment of the present invention.
Fig. 6A is a rectangular display screen according to a specific implementation of the text display method shown in fig. 1 according to the first embodiment of the present invention.
Fig. 6B is a triangular display screen according to a specific implementation of the text display method shown in fig. 1 according to the first embodiment of the present invention.
Fig. 7A is a block diagram of a text display apparatus according to a second embodiment of the invention.
Fig. 7B is a block diagram of another text display apparatus according to a second embodiment of the invention.
Fig. 7C is a schematic diagram of units of an information determination module in the text display apparatus shown in fig. 7A according to the second embodiment of the present invention.
Fig. 7D is a schematic diagram of units of an information obtaining module in the text display apparatus shown in fig. 7A according to the second embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a text display system according to a third embodiment of the present invention.
Fig. 9 is a schematic structural diagram of a computer-readable storage medium according to a fourth embodiment of the present invention. .
[ brief description of the drawings ]
S101-S105, S201-S202, S301-S303, S401-S403, S501-S502: a text display method step;
601: pre-displaying the text; 602: a left sideline; 603: a right sideline; 604: an upper edge line; 605: a lower edge line; 606: a target display area; 611: a triangular display screen; 612: inscribing a rectangular area; 613: pre-displaying the text; 614: the center position of the target display area; 615: pre-displaying a text center position;
700: a text display device; 701: a text acquisition module; 702: an information determination module; 703: an information acquisition module; 704: an offset generation module; 705: a text migration module; 706: an operation response module; 7021: a text scanning unit; 7022: a coordinate calculation unit; 7031: a size acquisition unit; 7032: a coordinate calculation unit;
800: a text display system; 801: a processor; 803: a memory;
900: a computer readable storage medium.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
[ first embodiment ] A method for manufacturing a semiconductor device
As shown in fig. 1, a text display method according to a first embodiment of the present invention includes:
s101, acquiring a pre-display text.
Firstly, a server side acquires a text which needs to be displayed on a display screen of a terminal, for example, a pre-displayed text is extracted from a character library, and the pre-displayed text comprises contents such as numbers, Chinese characters, English characters and the like.
And S102, determining text position information according to the pre-displayed text.
After the information of the pre-displayed text is obtained, a coordinate system is established, the position of the coordinate origin in the coordinate system is that a first pixel point scanned in a display screen where the pre-displayed text is located is used as the coordinate origin, namely, the upper left corner, the lower left corner, the upper right corner or the lower right corner of an effective display area in the display screen can be used as the coordinate origin, the text position information is determined according to the pre-displayed text, for example, after the boundary information of four sides of a left line left, a right line right, an upper line top and a lower line bottom of the pre-displayed text is obtained according to the pre-displayed text, the coordinate of the center position of the text is obtained through calculation, and the coordinate of the center position of the text isThe center position coordinates may be used as text position information.
S103, acquiring area position information of a target display area of the target display screen.
After determining the text position information, the server side acquires the region position information of the target display region of the target display screen, that is, acquires the region with pixel points scanned in the display screen (rectangular screen) where the pre-displayed text is located, where the region with pixel points can be understood as the target display region, and acquires the position information of the target display region, for example, the position information of the display regionThe screen is a rectangular display screen, the width of the rectangular display screen is w, the height of the rectangular display screen is h, and the region position information acquired by the server end can be the position of the central point of the rectangular display screen
And S104, generating a text offset according to the text position information and the region position information.
The server calculates the obtained text position information and the obtained area position information to obtain a text offset, for example, as in the above examples of step S102 and step S103, the obtained text offset is
S105, offsetting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen.
And after the text offset is calculated, correspondingly offsetting the position of the pre-displayed text according to the text offset, and changing the displayed position of the pre-displayed text in the target display screen, so that the effect of completely centering the vision is achieved.
In the prior art, a character is firstly obtained from a character library, and the line height of the whole character is determined from the highest vertex line to the lowest vertex line of the character, namely the line height of the whole character is determined through the two lines of the highest vertex line and the lowest vertex line, and when the character is called from the character library, the whole character is drawn through the line height. However, for the topmost dot line and the bottommost dot line, some characters called from the character library have an obviously downward state, that is, characters observed by a user in a display screen are in a downward position.
In another specific embodiment, as shown in fig. 2, the specific steps of step S102 include:
s201, scanning the pre-displayed text to obtain boundary information of the pre-displayed text.
After the pre-displayed text is obtained, a coordinate system is established, the position of the origin of coordinates in the coordinate system is the first pixel point scanned in the display screen where the pre-displayed text is located and is used as the origin of coordinates, in this embodiment, the lower left corner of the display screen is used as the origin of coordinates to establish the coordinate system, then the pre-displayed text is scanned, and boundary information of the pre-displayed text is obtained, where the boundary information may be coordinates of four vertexes of the pre-displayed text, and may also be four straight lines, such as a left line, a right line, a top line and a bottom line, of the pre-displayed text.
S202, calculating to obtain a text center coordinate based on the boundary information of the pre-displayed text as the text position information.
After boundary information of the pre-displayed text is obtained, the server side obtains a central coordinate point of the pre-displayed text according to four vertex coordinates of the obtained pre-displayed text or coordinates of four side lines of the pre-displayed text, namely an upper side line, a lower side line, a left side line and a right side line, and then stores the central coordinate as position information of the pre-displayed text, and when the coordinates of the four side lines of the pre-displayed text are obtained, the coordinates of the central position of the pre-displayed text are obtained through calculation and are used as coordinates of the four side lines of the pre-displayed textThe center position coordinates are then used as position information of the pre-display text.
In another specific embodiment, as shown in fig. 3, the specific steps of step S103 include:
s301, in response to the fact that the target display screen is a rectangular display screen, taking an effective display area of the target display screen as the target display area.
When a target display screen is a rectangular display screen, acquiring an effective display area in the target display screen, wherein the effective display area is an area in the rectangular display screen where pixel points are distributed, namely, the effective display area is an area in the rectangular display screen where texts can be displayed after black edges around the rectangular display screen are removed, and after the effective display area is acquired, taking the effective display area as the target display area.
S302, acquiring the length and the height of the target display area.
And after the effective display area is obtained, the length and the height of the target display area are obtained, namely the length and the height of the rectangular display screen are obtained.
And S303, calculating to obtain a region center coordinate based on the length and the height of the target display region as the region position information.
Obtaining the length and height of a target display area, obtaining a planar rectangular shape according to the length and height of a rectangular display screen, sequentially connecting four vertexes of the rectangular shape in opposite angles, namely connecting diagonal lines of the vertexes of the rectangle, then taking an intersection point of the diagonal lines as a central point of the rectangle, obtaining a coordinate of the central point according to a coordinate system, storing the central coordinate as position information of the target area, wherein the display screen is a rectangular display screen, the width of the rectangular display screen is w, the height of the rectangular display screen is h, and the area position information obtained by a server end is the intersection point of the diagonal lines of the rectangular shape, namely the position of the central point of the rectangular display screenThe area location information is
In another specific embodiment, as shown in fig. 4, the specific steps of step S103 include:
s401, responding to the fact that the target display screen is a non-rectangular display screen, and determining the target display area based on the effective display area of the target display screen and the target side length of the pre-displayed text.
When a target display screen is a non-rectangular display screen, firstly, an effective display area in the target display screen is obtained, wherein the effective display area is an area in the non-rectangular display screen where pixel points are distributed, namely, the effective display area is an area in the non-rectangular display screen where texts can be displayed after surrounding black edges are removed, for example, the effective display area is obtained as a triangular area, or a trapezoidal area, or a hexagonal area, and the display screens can be classified according to the obtained effective display area, such as the triangular display screen, the trapezoidal display screen, and the hexagonal display screen.
After the effective display area is acquired, a target display area needs to be acquired, wherein the acquisition of the target display area is realized by inscribing a rectangle in the effective display area based on a pre-displayed text, then the position information of the target area is determined through a diagonal intersection point of the rectangle, firstly, the side length of the pre-displayed text is determined, namely, the transverse side length in the side lengths of the two sides of the whole pre-displayed text is taken as the length of the inscribing rectangle, then, the height of the maximum height which can be reached in the effective display area according to the length is taken as the height of the inscribing rectangle to determine the target display area, of course, the acquisition of the target display area can also be realized by circumscribed rectangle in the effective display area based on the pre-displayed text, the inscribing rectangle or the circumscribed rectangle can be determined according to the actual situation to determine the position information of the target area, and the specific position is not limited here.
S402, acquiring the length and the height of the target display area.
After the effective display area is obtained, determining the length of an inscribed rectangle in the effective display area, wherein the inscribed rectangle is a target display area, the length is the length of the side length in the transverse direction in the pre-displayed text, after the length is determined, extending the longitudinal height of the inscribed rectangle until the inscribed rectangle can be extended to the maximum height in the effective display area, and determining the height.
And S403, calculating area center coordinates based on the length and the height of the target display area to obtain area position information.
Determining the length and height of the target display area, namely determining the length and height of an inscribed rectangle, then sequentially connecting four vertexes of the rectangle in opposite angles, namely connecting the diagonals of the vertexes of the rectangle, then taking the intersection point of the diagonals as the center point of the rectangle, then acquiring the coordinates of the center point according to a coordinate system, and taking the center coordinates as the position information of the target area.
In another specific embodiment, as shown in fig. 5, after step S105, the method further includes:
s501, responding to input operation of a user on the man-machine interaction interface to obtain a second text offset.
When a user finds that the pre-displayed text is displayed on the display screen and the pre-displayed text is not completely located at the centered position, the user inputs a corresponding offset value on the man-machine interaction interface, such as offsetting a (1,2) coordinate or offsetting a value, and the server takes the value input by the user on the man-machine interaction interface as a second text offset after receiving the value.
S502, shifting the pre-displayed text based on the second text offset to change the display position of the pre-displayed text on the target display screen again.
And after receiving the second text offset, automatically shifting the pre-displayed text according to the second text offset, and changing the display position of the pre-displayed text after the text offset is shifted.
For the sake of better understanding of the present embodiment, the text display method of the present embodiment will be described in detail with reference to fig. 6A to 6B.
Firstly, scanning the pre-displayed text 601 "gggg" in fig. 6A to obtain a left line 602, a right line 603, an upper line 604 and a lower line 605 thereof, and obtaining the coordinate of the center position of the text asTaking the coordinate of the central point as the position information of the text, acquiring a target display screen where the text is located, acquiring a target display area 606 according to the target display screen, namely the display screen is a rectangular display screen, acquiring an area with black edges removed from the display screen, namely the target display area 606, and then acquiring the length x and the height y of the target display area, wherein the acquired area position information is the intersection point of diagonal lines of the rectangular shape, namely the central point position of the rectangular display screenThe area location information isThe resulting text offset isAnd then, the text gggg is shifted according to the text offset, so that the text can be moved to a state of being completely centered on the display screen.
As shown in fig. 6B, the target display screen is a triangular display screen 611, that is, a non-rectangular display screen, first obtaining a pre-displayed text 613, that is, scanning a text "gggg" to obtain a center position 615 of the pre-displayed text 613, then obtaining a length of a lateral side of the pre-displayed text 613, taking the length as a length of a target display area, that is, a length of a side of an inscribed rectangle 612 of the triangular display screen, then extending a height of the target display area to a maximum value to obtain a length and a height of the inscribed rectangle 612, then obtaining a center position 614 of the target display area through an intersection of diagonal lines of the inscribed rectangle 612, and finally shifting the text "gggg" from the center position 615 to the center position 614 of the target display area, so as to achieve a state that the text is completely centered in the triangular display screen.
When the user finds that the pre-displayed text is not completely positioned in the center of the display screen, the aim of manual adjustment of the user can be fulfilled through a human-computer interaction interface, namely, the user can input an offset value at the server end.
In summary, in the prior art, a character is first obtained from a character library, and the line height of the whole character is determined from the highest vertex line to the lowest vertex line of the character, that is, the line height of the whole character is determined by two lines, namely, the highest vertex line and the lowest vertex line, and when the character is called from the character library, the whole character is drawn by the line height. However, for the topmost dot line and the bottommost dot line, some characters called from the character library are in an obviously downward state, that is, the characters observed by the user in the display screen are in a downward position, and the characters displayed on the display screen after centering alignment are set to be in an obviously downward state, that is, the characters observed by the user are not in a completely centered position.
[ second embodiment ]
As shown in fig. 7A, a text display device 700 according to a second embodiment of the present invention includes: a text acquisition module 701, an information determination module 702, an information acquisition module 703, an offset generation module 704, and a text offset module 705.
The text obtaining module 701 is configured to obtain a pre-display text. An information determining module 702, configured to determine text position information according to the pre-displayed text. The information obtaining module 703 is configured to obtain area position information of a target display area of a target display screen. An offset generating module 704, configured to generate a text offset according to the text position information and the region position information. The text shifting module 705 is configured to shift the pre-displayed text according to the text shifting amount, so as to change a display position of the pre-displayed text on the target display screen.
In the embodiment of the present invention, in the prior art, a character needs to be obtained from a character library, and the line height of the whole character is determined from the highest vertex line to the lowest vertex line of the character, that is, the line height of the whole character is determined by two lines, namely, the highest vertex line and the lowest vertex line, and when the character is called from the character library, the whole character is drawn by the line height. However, for the topmost dot line and the bottommost dot line, some characters called from the character library are in an obviously downward state, that is, the characters observed by the user in the display screen are in a downward position, and the characters displayed on the display screen after centering alignment are set to be in an obviously downward state, that is, the characters observed by the user are not in a completely centered position.
Further, as shown in fig. 7B, the text display device in this embodiment further includes: and the operation response module 706 is configured to respond to an input operation of a user on a human-computer interaction interface, obtain a second text offset, and offset the pre-displayed text based on the second text offset, so as to change the display position of the pre-displayed text on the target display screen again.
In another specific embodiment, as shown in fig. 7C, the information determining module 7022 includes, for example: a text scanning unit 7021 and a coordinate calculation unit 7022.
The text scanning unit 7021 is configured to scan the pre-displayed text to obtain boundary information of the pre-displayed text. A coordinate calculating unit 7022, configured to calculate a center coordinate of the text as the text position information based on the boundary information of the pre-displayed text.
In another specific embodiment, as shown in fig. 7D, the information obtaining module 703 includes, for example: a size acquisition unit 7031 and a coordinate calculation unit 7032.
Wherein, the size obtaining unit 7031 is configured to obtain the length and the height of the target display area. A coordinate calculating unit 7032, configured to calculate, based on the length and the height of the target display area, an area center coordinate as the area position information.
The text display method implemented by the text display device disclosed in this embodiment is as described in the first embodiment, and therefore, will not be described in detail herein. Optionally, each module and the other operations or functions in the second embodiment are respectively for implementing the method in the first embodiment of the present invention, and the beneficial effects of this embodiment are the same as those of the first embodiment, and are not described herein again for brevity.
[ third embodiment ]
As shown in fig. 8, a text display system 800 according to a third embodiment of the present invention includes: a processor 801 and a memory 803; the memory 803 stores instructions that are executed by the processor 801 and that, for example, cause the processor 801 to perform operations to perform the text display method described in the foregoing first embodiment.
[ fourth example ] A
As shown in fig. 9, a computer-readable storage medium 900 according to a fourth embodiment of the present invention is a non-volatile memory and stores program codes, and when the program codes are executed by one or more processors, the one or more processors are caused to execute the text display method according to the first embodiment.
In addition, it should be understood that the foregoing embodiments are merely exemplary illustrations of the present invention, and technical solutions of the embodiments can be arbitrarily combined and used without conflict between technical features and structures, and without departing from the purpose of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and/or method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units/modules is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units/modules described as separate parts may or may not be physically separate, and parts displayed as units/modules may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units/modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.
The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A text display method, comprising:
acquiring a pre-display text;
determining text position information according to the pre-displayed text;
acquiring area position information of a target display area of a target display screen;
generating a text offset according to the text position information and the region position information; and
and shifting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen.
2. The method of claim 1, wherein determining text position information from the pre-displayed text comprises:
scanning the pre-displayed text to obtain boundary information of the pre-displayed text;
and calculating to obtain a text center coordinate as the text position information based on the boundary information of the pre-displayed text.
3. The text display method according to claim 1, wherein the acquiring region position information of the target display region of the target display screen comprises:
acquiring the length and the height of the target display area;
calculating area center coordinates based on the length and the height of the target display area as the area position information.
4. The text display method according to claim 3, further comprising, before the obtaining the length and the height of the target display area:
and in response to the target display screen being a rectangular display screen, taking the effective display area of the target display screen as the target display area.
5. The text display method according to claim 3, comprising, before the obtaining the length and the height of the target display area:
and in response to the target display screen being a non-rectangular display screen, determining the target display area based on the effective display area of the target display screen and the target side length of the pre-displayed text.
6. The text display method according to claim 1, further comprising, after the shifting the pre-displayed text according to the text offset to change the display position of the pre-displayed text on the target display screen:
responding to the input operation of a user on the man-machine interaction interface to obtain a second text offset;
shifting the pre-displayed text based on the second text offset to again change the display position of the pre-displayed text on the target display screen.
7. A text display apparatus, comprising:
the text acquisition module is used for acquiring a pre-display text;
the information determining module is used for determining text position information according to the pre-displayed text;
the information acquisition module is used for acquiring the area position information of a target display area of the target display screen;
the offset generation module is used for generating text offset according to the text position information and the region position information;
and the text offset module is used for offsetting the pre-displayed text according to the text offset so as to change the display position of the pre-displayed text on the target display screen.
8. The text display apparatus of claim 7, wherein the information determination module comprises:
the text scanning unit is used for scanning the pre-displayed text to obtain boundary information of the pre-displayed text;
and the coordinate calculation unit is used for calculating a text center coordinate based on the boundary information of the pre-displayed text to be used as the text position information.
9. The text display apparatus according to claim 7, wherein the information acquisition module comprises:
a size acquisition unit for acquiring the length and height of the target display area;
and the coordinate calculation unit is used for calculating the center coordinates of the area based on the length and the height of the target display area to obtain the area position information.
10. The text display apparatus of claim 7, further comprising:
and the operation response module is used for responding to the input operation of a user on a human-computer interaction interface, obtaining a second text offset, and offsetting the pre-displayed text based on the second text offset so as to change the display position of the pre-displayed text on the target display screen again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010402996.4A CN113673200A (en) | 2020-05-13 | 2020-05-13 | Text display method and text display device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010402996.4A CN113673200A (en) | 2020-05-13 | 2020-05-13 | Text display method and text display device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113673200A true CN113673200A (en) | 2021-11-19 |
Family
ID=78536963
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010402996.4A Pending CN113673200A (en) | 2020-05-13 | 2020-05-13 | Text display method and text display device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113673200A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016001748A1 (en) * | 2014-06-30 | 2016-01-07 | Alcatel Lucent | Method and apparatus for displaying an operation on a touch screen of a device |
WO2017067275A1 (en) * | 2015-10-21 | 2017-04-27 | 广州视睿电子科技有限公司 | Document image display method, device and terminal |
US20180232135A1 (en) * | 2015-10-16 | 2018-08-16 | Hisense Mobile Communications Technology Co., Ltd. | Method for window displaying on a mobile terminal and mobile terminal |
CN109413479A (en) * | 2018-09-28 | 2019-03-01 | 四川长虹电器股份有限公司 | The method that smart television voice Interaction Interface content of text is completely shown |
US20190138075A1 (en) * | 2016-07-08 | 2019-05-09 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Screen display method, apparatus and mobile terminal |
CN110443140A (en) * | 2019-07-05 | 2019-11-12 | 平安科技(深圳)有限公司 | Method, apparatus, computer equipment and the storage medium of String localization |
-
2020
- 2020-05-13 CN CN202010402996.4A patent/CN113673200A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016001748A1 (en) * | 2014-06-30 | 2016-01-07 | Alcatel Lucent | Method and apparatus for displaying an operation on a touch screen of a device |
US20180232135A1 (en) * | 2015-10-16 | 2018-08-16 | Hisense Mobile Communications Technology Co., Ltd. | Method for window displaying on a mobile terminal and mobile terminal |
WO2017067275A1 (en) * | 2015-10-21 | 2017-04-27 | 广州视睿电子科技有限公司 | Document image display method, device and terminal |
US20190138075A1 (en) * | 2016-07-08 | 2019-05-09 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Screen display method, apparatus and mobile terminal |
CN109413479A (en) * | 2018-09-28 | 2019-03-01 | 四川长虹电器股份有限公司 | The method that smart television voice Interaction Interface content of text is completely shown |
CN110443140A (en) * | 2019-07-05 | 2019-11-12 | 平安科技(深圳)有限公司 | Method, apparatus, computer equipment and the storage medium of String localization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090021530A1 (en) | Display control apparatus and display control method | |
US8358875B2 (en) | Image display device, image display method, and computer readable medium | |
US10296559B2 (en) | Display apparatus, control method therefor, and storage medium | |
CN110427601B (en) | Form processing method and device, intelligent interactive panel and storage medium | |
US8854691B2 (en) | Image processing apparatus and image processing method for extracting a line segment | |
US9679353B2 (en) | Plan display device that displays enlarged/reduced image of original image with indication and plan display program for displaying same | |
US20190034719A1 (en) | Splitting merged table cells | |
JP2000235619A (en) | Surface image processor and its program storage medium | |
CN111145286A (en) | Point nine picture mapping drawing method for edge calculation scene based on GPU | |
JP5299125B2 (en) | Document processing apparatus and program | |
CN113963083B (en) | Programming building block drawing method, building block building method, device and electronic equipment | |
CN113538623A (en) | Method and device for determining target image, electronic equipment and storage medium | |
CN113673200A (en) | Text display method and text display device | |
JP4208520B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
CN113096217B (en) | Picture generation method and device, electronic equipment and storage medium | |
JP4825888B2 (en) | Document image processing apparatus and document image processing method | |
CN114741188A (en) | Graphic element processing method and device, electronic equipment and storage medium | |
CN112465931A (en) | Image text erasing method, related equipment and readable storage medium | |
JPH06274303A (en) | Multiwindow display method | |
JP5492911B2 (en) | Character creation method and character creation device | |
JP2013065164A (en) | Image processing device, image processing method, and image processing program | |
JP2614111B2 (en) | A method for detecting the correlation between a straight line display element and a rectangular window | |
JP4890425B2 (en) | Method and program for creating mask image for manga frame image | |
JP4059438B2 (en) | Graphic or character display device, display method, display program, and recording medium recording the display program | |
JP6016508B2 (en) | Display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |