CN106095744B - Irregular control icons processing unit and method - Google Patents

Irregular control icons processing unit and method Download PDF

Info

Publication number
CN106095744B
CN106095744B CN201610363369.8A CN201610363369A CN106095744B CN 106095744 B CN106095744 B CN 106095744B CN 201610363369 A CN201610363369 A CN 201610363369A CN 106095744 B CN106095744 B CN 106095744B
Authority
CN
China
Prior art keywords
text
irregular
region
text information
background
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
Application number
CN201610363369.8A
Other languages
Chinese (zh)
Other versions
CN106095744A (en
Inventor
安占磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610363369.8A priority Critical patent/CN106095744B/en
Publication of CN106095744A publication Critical patent/CN106095744A/en
Application granted granted Critical
Publication of CN106095744B publication Critical patent/CN106095744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a kind of irregular control icons processing unit, described device includes: acquisition module, for obtaining the corresponding irregular Background of text control and text information;Division module, for the irregular Background to be divided into multiple text importing regions according to preset division mode;Module is arranged, the text for the total and described text information according to the text importing region is total, the text information is sequentially arranged in the irregular Background, so that the typesetting of text information is consistent with the shape of irregular Background.In the irregular control icons that the present invention is handled, the typesetting of text information is consistent with irregular Background, improves the flexibility of irregular control icons processing.

Description

Irregular control icons processing unit and method
Technical field
The present invention relates to field of mobile terminals more particularly to a kind of irregular control icons processing units and method.
Background technique
In terminal operating system, TextView control is most-often used UI (User Interface, user interface) One of control plays the role of can not be substituted wherein text abundant can be shown for the displaying of information.Current control It include regular control icons and irregular control icons in icon, but in two kinds of control icons, the type-setting mode of text information Excessively unification, the only square-folded display text information inside icon, such as Fig. 1, text information are only shown in Inside dotted line frame, visual effect to user is simultaneously bad.
Summary of the invention
It is a primary object of the present invention to propose a kind of irregular control icons processing unit and method, it is intended to solve existing Irregular control icons in, the technical issues of text information type-setting mode unification.
To achieve the above object, a kind of irregular control icons processing unit provided by the invention, the irregular control Icon processing unit includes:
Module is obtained, for obtaining the corresponding irregular Background of text control and text information;
Division module, for the irregular Background to be divided into multiple text importing areas according to preset division mode Domain;
Module is arranged, the text for the total and described text information according to the text importing region is total, will The text information is sequentially arranged in the irregular Background, so that the shape of the typesetting of text information and irregular Background Shape is consistent.
Optionally, the division module includes:
Submodule is filled up, for the longest edge and most length and width according to the irregular Background, by the irregular background Figure is filled up as using the longest edge and the most length and width as the rectangle of side length;
Submodule is divided, for according to preset size, the rectangle filled up to be carried out gridding subdivision, to draw It is divided into the unit area of multiple equalizations;
Submodule is handled, for obtaining each unit region comprising irregular Background, and each unit that will acquire Region is as text importing region.
Optionally, the arrangement module includes:
Acquisition submodule, the ratio that text importing region area is accounted for for obtaining effective area are greater than the text of preset ratio Display area, wherein the effective area is the corresponding region area of irregular Background in the text importing region;
Submodule is arranged, for the text according to the total and described text information in the text importing region of acquisition The text information is sequentially arranged in the text importing region of acquisition by sum.
Optionally, the arrangement submodule includes:
Determination unit is greater than the text sum of the text information for the sum in the text importing region of acquisition When, determine that the text importing region exceeds the quantity of the text sum;
Arrangement units, the text importing area for the hollow remaining quantity out of the predeterminable area in the irregular Background Domain, and the text information is sequentially arranged in remaining text importing region.
Optionally, the irregular control icons processing unit further include:
Determining module, for the text information in the starting text importing region of every a line or end text importing region When for punctuation mark, determine the type of the punctuation mark, wherein the type of the punctuation mark include left side punctuation mark, Right side punctuation mark and independent punctuation mark;
Module is adjusted, for according to starting text importing region or end text importing region and the punctuation mark Type, adjust the position of punctuation mark described in the irregular Background.
In addition, to achieve the above object, the present invention also proposes a kind of irregular control icons processing method, described irregular Control icons processing method includes:
Obtain the corresponding irregular Background of text control and text information;
The irregular Background is divided into multiple text importing regions according to preset division mode;
According to the text of the total and described text information in text importing region sum, by the text information according to It is secondary to be arranged in the irregular Background, so that the typesetting of text information is consistent with the shape of irregular Background.
Optionally, described that the irregular Background is divided by multiple text importing regions according to preset division mode The step of include:
According to the longest edge and most length and width of the irregular Background, by the irregular Background fill up for it is described most Long side and the most length and width are the rectangle of side length;
According to preset size, the rectangle filled up is subjected to gridding subdivision, to be divided into multiple equalizations Unit area;
Each unit region comprising irregular Background is obtained, and each unit region that will acquire is as text importing Region.
Optionally, the text sum of the total and described text information according to the text importing region, by institute Stating the step that text information is sequentially arranged in the irregular Background includes:
Obtain text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area, wherein The effective area is the corresponding region area of irregular Background in the text importing region;
According to the text of the total and described text information in the text importing region of acquisition sum, by the text Information is sequentially arranged in the text importing region of acquisition.
Optionally, the text of the total and described text information in the text importing region according to acquisition is total It counts, includes: by the step that the text information is sequentially arranged in the text importing region of acquisition
When sum in the text importing region of acquisition is greater than the text sum of the text information, the text is determined Word display area exceeds the quantity of the text sum;
The predeterminable area of the irregular Background it is hollow it is remaining go out the quantity text importing region, and by the text This information is sequentially arranged in remaining text importing region.
Optionally, described total according to the quantity in the text importing region and the text of the text information, by institute After stating the step that text information is sequentially arranged in the irregular Background, the irregular control icons processing method is also Include:
When text information in the starting text importing region of every a line or end text importing region is punctuation mark, Determine the type of the punctuation mark, wherein the type of the punctuation mark include left side punctuation mark, right side punctuation mark and Independent punctuation mark;
According to starting text importing region or end text importing region and the type of the punctuation mark, institute is adjusted State the position of punctuation mark described in irregular Background.
It is corresponding not to obtain module acquisition text control for irregular control icons processing unit and method proposed by the present invention The irregular Background is divided into multiple by regular Background and text information, division module according to preset division mode Text importing region, arrangement module, will according to the text sum of the total and described text information in the text importing region The text information is sequentially arranged in the irregular Background, so that the shape of the typesetting of text information and irregular Background Shape is consistent, in the irregular control icons that realize that treated, the type-setting mode of text information and the irregular Background Shape is consistent, rather than the square-folded display text information in control icons, the present invention in text information type-setting mode with Irregular Background and change, improve the flexibility of irregular control icons processing.
Detailed description of the invention
Fig. 1 is the schematic diagram of existing irregular control icons;
The hardware structural diagram of Fig. 2 mobile terminal of each embodiment to realize the present invention;
Fig. 3 is the module diagram of the irregular control icons processing unit first embodiment of the present invention;
Fig. 4 is the schematic diagram of the irregular control icons of the present invention;
Fig. 5 is the module diagram of division module in Fig. 3;
Fig. 6 is the schematic diagram that the irregular control icons of the present invention divide text importing region;
Fig. 7 is the module diagram that module is arranged in Fig. 3;
Fig. 8 is the text importing region that the present invention reaches preset ratio to the ratio that effective area accounts for text importing region, The schematic diagram being marked;
Fig. 9 is the module diagram that submodule is arranged in Fig. 7;
Figure 10 is the module diagram of irregular the 5th embodiment of control icons processing unit of the present invention;
Figure 11 is the implement scene schematic diagram of the position of present invention adjustment punctuation mark;
Figure 12 is the flow diagram of the irregular control icons processing method first embodiment of the present invention;
The irregular Background is divided into multiple text importing areas according to preset division mode for the present invention by Figure 13 The flow diagram of domain preferred embodiment;
Figure 14 is text sum of the present invention according to the total and described text information in the text importing region, by institute State the flow diagram that text information is sequentially arranged in preferred embodiment in the irregular Background;
Figure 15 is that the present invention is total according to the text of the total and described text information in the text importing region of acquisition The text information, is sequentially arranged in the flow diagram of preferred embodiment in the text importing region of acquisition by number;
Figure 16 is the flow diagram of irregular the 5th embodiment of control icons processing method of the present invention.
The realization, the function and the advantages of the object of the present invention will be explained referring to attached drawing in conjunction with the embodiments.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use For indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself There is no specific meanings.Therefore, " module " can be used mixedly with " component ".
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as moving Phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP The mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidated Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that in addition to being used in particular for moving Except the element of purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
The hardware configuration signal of Fig. 2 each embodiment one optional mobile terminal to realize the present invention.
Mobile terminal 100 may include wireless communication unit 110, A/V (audio/video) input unit 120, user's input Unit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power supply unit 190 Etc..Fig. 2 shows the mobile terminals with various assemblies, it should be understood that being not required for implementing all groups shown Part.More or fewer components can alternatively be implemented.The element of mobile terminal will be discussed in more detail below.
Wireless communication unit 110 generally includes one or more components, allows mobile terminal 100 and wireless communication device Or the radio communication between network.
A/V input unit 120 is for receiving audio or video signal.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminal Kind operation.User input unit 130 allows user to input various types of information, and may include keyboard, metal dome, touch Plate (for example, the sensitive component of detection due to the variation of resistance, pressure, capacitor etc. caused by being contacted), idler wheel, rocking bar etc. Deng.Particularly, when touch tablet is superimposed upon in the form of layer on display unit 151, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shape State), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal 100 orientation, the acceleration of mobile terminal 100 or by fast movement and direction etc., and generate for controlling mobile terminal 100 The order of operation or signal.For example, sensing unit 140 can sense when mobile terminal 100 is embodied as sliding-type mobile phone The sliding-type phone is to open or close.In addition, sensing unit 140 be able to detect power supply unit 190 whether provide electric power or Whether person's interface unit 170 couples with external device (ED).
Interface unit 170 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Identification module can be storage and use each of mobile terminal 100 for verifying user It plants information and may include subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) Etc..In addition, the device (hereinafter referred to as " identification device ") with identification module can take the form of smart card, therefore, know Other device can be connect via port or other attachment devices with mobile terminal 100.Interface unit 170, which can be used for receiving, to be come from The input (for example, data information, electric power etc.) of external device (ED) and the input received is transferred in mobile terminal 100 One or more elements can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connect with external base, interface unit 170 may be used as allowing will be electric by it Power, which is provided from pedestal to the path or may be used as of mobile terminal 100, allows the various command signals inputted from pedestal to pass through it It is transferred to the path of mobile terminal.The various command signals or electric power inputted from pedestal, which may be used as mobile terminal for identification, is The no signal being accurately fitted on pedestal.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeated Signal (for example, audio signal, vision signal, alarm signal, vibration signal etc.) out.Output unit 150 may include display Unit 151.
Display unit 151 may be displayed on the information handled in mobile terminal 100.For example, when mobile terminal 100 is in electricity When talking about call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia file Downloading etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling mode Or when image capture mode, display unit 151 can show captured image and/or received image, show video or figure Picture and the UI or GUI of correlation function etc..
Meanwhile when display unit 151 and touch tablet in the form of layer it is superposed on one another to form touch screen when, display unit 151 may be used as input unit and output device.Display unit 151 may include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least It is a kind of.Some in these displays may be constructed such that transparence to allow user to watch from outside, this is properly termed as transparent Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific Desired embodiment, mobile terminal 100 may include two or more display units (or other display devices), for example, moving Dynamic terminal may include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detecting touch Input pressure and touch input position and touch input area.
Memory 160 can store the software program etc. of the processing and control operation that are executed by controller 180, Huo Zheke Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And And memory 160 can store about the vibrations of various modes and audio signal exported when touching and being applied to touch screen Data.
Memory 160 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, more Media card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access storage Device (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connection The network storage device of 160 store function cooperates.
The overall operation of the usually control mobile terminal of controller 180.For example, controller 180 executes and voice communication, data Communication, video calling etc. relevant control and processing.In addition, controller 180 may include for reproducing (or playback) more matchmakers The multi-media module 181 of volume data, multi-media module 181 can construct in controller 180, or can be structured as and control Device 180 separates.Controller 180 can be with execution pattern identifying processing, by the handwriting input executed on the touchscreen or picture It draws input and is identified as character or image.
Power supply unit 190 receives external power or internal power under the control of controller 180 and provides operation each member Electric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereof Machine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Programming gate array (FPGA), controller, microcontroller, microprocessor, is designed to execute function described herein processor At least one of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180. For software implementation, the embodiment of such as process or function can with allow to execute the individual of at least one functions or operations Software module is implemented.Software code can by the software application (or program) write with any programming language appropriate Lai Implement, software code can store in memory 160 and be executed by controller 180.
So far, oneself is through describing mobile terminal according to its function.In the following, for the sake of brevity, will description such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc., which is used as, to be shown Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Based on above-mentioned mobile terminal hardware configuration, each embodiment of the irregular control icons processing unit of the present invention is proposed.
It is the module diagram of the irregular control icons processing unit first embodiment of the present invention referring to Fig. 3, Fig. 3.
It is emphasized that it will be apparent to those skilled in the art that module map shown in Fig. 3 is only a preferred embodiment Exemplary diagram, those skilled in the art surround irregular control icons processing unit shown in Fig. 3 module, can carry out easily The supplement of new module;The title of each module is self-defined title, is only used for auxiliary and understands the irregular control icons processing dress The each program function block set is not used in restriction technical solution of the present invention, and the core of technical solution of the present invention is, each customized The function to be reached of the module of title.
The present embodiment proposes a kind of irregular control icons processing unit, the irregular control icons processing unit packet It includes:
Module 10 is obtained, for obtaining the corresponding irregular Background of text control and text information;
Division module 20, for the irregular Background to be divided into multiple text importings according to preset division mode Region;
Module 30 is arranged, the text for the total and described text information according to the text importing region is total, The text information is sequentially arranged in the irregular Background, so that the typesetting of text information and irregular Background Shape is consistent.
In the present embodiment, it obtains module 10 and first obtains the corresponding irregular Background of text control and text information, Wherein, the text information includes text, character and punctuation mark, and therefore, text, character and punctuation mark are all counted to hereinafter Text sum in.Then the irregular Background is divided into multiple texts according to preset division mode by division module 20 Display area, wherein the preset division mode is exactly that the irregular Background is divided with pre-set dimension, more to be divided into A text importing region, the pre-set dimension set as the case may be, a, default;B, with text sum into Row variation, if be changed with text sum, then preferably there is a size range to be selected, selects before this smallest Size divides the irregular Background, to mark off each text importing region, if the text importing region sum divided is remote Text sum beyond the text information, can choose the size bigger than current size and draws to the irregular Background Point, and so on, until the text importing region marked off is close with the text sum of the text information.
It should be understood that the division in the present embodiment is virtual division, it is not really to mark off solid line, but be The virtual grate for facilitating the arrangement of description text information to carry out.
After division obtains each text importing region, arrangement module 30 according to the text importing region sum with And the text sum of the text information, the text information is sequentially arranged in the irregular Background, so that text The typesetting of information is consistent with the shape of irregular Background, the total and described text according to the text importing region The text sum of information, the text information is sequentially arranged in includes: 1 in the irregular Background, in sequence successively The text information is arranged in each text importing region of the irregular Background;2, in order to improve text information row The flexibility of column first determines that the text importing region exceeds the quantity of the text sum, then in the irregular background The text importing region of the hollow remaining quantity out of the predeterminable area of figure, and the text information is sequentially arranged in remaining text In word display area, so that the typesetting of text information is consistent with the shape of irregular Background, wherein the predeterminable area can be with It is the intermediate region in irregular Background, can be two end regions in irregular Background.
In the present embodiment, in order to improve the intelligence that text information is shown, the text shown in each text importing region Word size can be adjusted, and can set a display size at the beginning, if detecting that character size is significantly less than or is less than When the bulk in the text importing region, then the character size in each text importing region can be adjusted.
It is understood that in treated irregular control icons, the type-setting mode of text information and described irregular The shape of Background is consistent, i.e., the text information placement region divided in irregular Background is no longer the region of rule, and It is to be divided according to the shape of the irregular Background, when subsequent placement text information, so that it may according to irregular Placement region arranges text information, specifically can refer to Fig. 4, so that the placement of text information is more intelligent and flexible.
It is corresponding irregular to obtain module acquisition text control for the irregular control icons processing unit that the present embodiment proposes The irregular Background is divided into multiple texts according to preset division mode by Background and text information, division module Display area, arrangement module, will be described according to the text sum of the total and described text information in the text importing region Text information is sequentially arranged in the irregular Background, so that the shape one of the typesetting of text information and irregular Background It causes, in the irregular control icons that realize that treated, the shape of the type-setting mode of text information and the irregular Background Unanimously, the square-folded display text information rather than in control icons, the type-setting mode of text information is not in the present invention Regular Background and change, improve the flexibility of irregular control icons processing.
Further, the module diagram of the irregular control icons processing unit second embodiment of the present invention is proposed.
The second embodiment of irregular control icons processing unit and the first of irregular control icons processing unit are implemented The difference of example is that, referring to Fig. 5, the division module 20 includes:
Submodule 21 is filled up, for the longest edge and most length and width according to the irregular Background, by the irregular back Scape figure is filled up as using the longest edge and the most length and width as the rectangle of side length;
Submodule 22 is divided, for according to preset size, the rectangle filled up to be carried out gridding subdivision, with It is divided into the unit area of multiple equalizations;
Submodule 23 is handled, for obtaining each unit region comprising irregular Background, and each list that will acquire First region is as text importing region.
In the present embodiment, the longest edge and most length and width for first determining the irregular Background, then fill up submodule 21 According to the longest edge and most length and width of the irregular Background, the irregular Background is filled up as with the longest edge and institute The rectangle that most length and width are side length is stated, specifically can refer to Fig. 6, wherein longest edge is exactly the bottom edge in irregular Background, most length and width It is exactly the side of irregular Background.Then divide submodule 22 according to preset size, by the rectangle filled up into Row gridding subdivision, to be divided into the unit area of multiple equalizations, wherein the preset size is size set in advance, Such as 5mm*5mm will be sized to, naturally it is also possible to be set as other values.It should be understood that the gridding subdivision can Irregular Background to be divided into the quadrangle, pentagon, hexagon etc. of multiple equalizations, in the present embodiment, preferably will not Regular Background is divided into the quadrangle of multiple equalizations, at this time referring again to Fig. 6.
After division obtains each unit region, due to being that the rectangle that will be filled up carries out gridding at the beginning Subdivision, to be divided into the unit area of multiple equalizations, therefore, there is only comprising irregularly carrying on the back in obtained each unit region The unit area of scape figure, there is also each unit regions for not including irregular Background, it is possible to is existed in rectangular edges The unit area of other backgrounds is completely included, at this point, processing submodule 23 only obtains each unit comprising irregular Background Region, each unit region that then will acquire is as text importing region, other each lists not comprising irregular Background First region is then not as text importing region.
It in the present embodiment, is not the distributing position of random division text information, nor square-folded irregular Rectangular area is divided in Background inside, then text information is sequentially arranged in the rectangular area marked off (such as Fig. 1), but It is first that the irregular Background supplement is rectangular, then according still further to preset size, the rectangle filled up is carried out Gridding subdivision, it is final to obtain each unit region comprising irregular Background to be divided into the unit area of multiple equalizations, And each unit region that will acquire, as text importing region, the marginal position realized in irregular Background also can be used as Text importing region, and text information is sequentially arranged in the text importing region of the irregular Background, improve text The flexibility of this information typesetting.
Further, the module diagram of the irregular control icons processing unit 3rd embodiment of the present invention is proposed.
The 3rd embodiment of irregular control icons processing unit and the second of irregular control icons processing unit are implemented The difference of example is that, referring to Fig. 7, the arrangement module 30 includes:
Acquisition submodule 31, the ratio that text importing region area is accounted for for obtaining effective area are greater than the text of preset ratio Word display area, wherein the effective area is the corresponding region area of irregular Background in the text importing region;
Submodule 32 is arranged, for the text according to the total and described text information in the text importing region of acquisition Word sum, the text information is sequentially arranged in the text importing region of acquisition.
From in above-described embodiment it is found that marked off multiple text importing regions in the rectangle, and above-mentioned implementation The text importing region obtained in example is the text importing region comprising irregular Background, then the text importing region obtained Middle may further include the background of page script, i.e., include not only irregular Background, may include the blank background of the page Etc., therefore, show text information in the present embodiment more accurate, i.e., the region without departing from irregular Background is excellent Acquisition submodule 31 is selected to obtain text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area, It is worth noting that, the number in the text importing region obtained has to be larger than or total, the sheet equal to the text of the text information The preset ratio in embodiment is set as the case may be, in order to be shown in text information all irregularly The inside of Background can set the preset ratio to 100%, that is, in the rectangle, obtain effective area and account for text The ratio of word display area area reaches 100% text importing region, i.e. effective area is entirely the irregular Background The text importing region in region realizes and excludes the text importing region including other background areas or page area, The text information is sequentially arranged in the text importing region of acquisition by final arrangement submodule 32.
In the present embodiment, the number in the text importing region of acquisition have to be larger than or equal to the text information text Sum just can guarantee that text information can be all arranged in the irregular Background, if detecting the text of acquisition in this way The number of word display area is less than the text sum of the text information, at this time, it may be necessary to carry out net to the rectangle after filling up again For the size formatted subdivision, also, divided than the size dot again of last time, the unit area quantity of so division can be more, And each unit region comprising irregular Background is equally first obtained, and each unit region that will acquire is aobvious as text Show region, finally obtain text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area again, So that the sum in the text importing region obtained again is greater than or equal to the text sum of the text information, if obtaining again Text importing region sum it is total still less than the text of the text information, then continue to divide, and so on, directly To the text importing region of acquisition sum be greater than or equal to the text information text sum,
Further, the text for being greater than preset ratio in the ratio for getting effective area and accounting for text importing region area is aobvious After showing region, the ratio that effective area can be accounted for text importing region area is greater than the text importing zone marker of preset ratio It is 1, can be used for indicating effective text importing region, and the ratio that effective area accounts for text importing region area is less than or equal in advance If the text importing zone marker of ratio is 0, it can be used for indicating invalid text importing region.
It is best understood from the present embodiment, referring to Fig. 8, the rectangle after filling up carries out gridding subdivision, and it is aobvious to be divided into each text Show region, is then by the text importing area identification that the ratio that effective area accounts for text importing region area reaches preset ratio 1, and be 0 by the text importing area identification comprising other background areas, wherein the text importing region for being identified as 1 is exactly text Text information write-in is finally identified as in 1 each text importing region by this information position to be written, and can from Fig. 8 Out, in finally obtained irregular control icons, the type-setting mode of text information and the irregular Background target shape one It causes.
Further, when being identified to each text importing region, if there are the mark in current character region with When the mark in adjacent text importing region is different, it is likely to be the interference of noise at this time, then first judging adjacent text importing Identifying whether for the adjacent other text importing regions in region text importing adjacent with this region is identical, if they are the same, it is believed that when There are noise interference for preceding character area, and mark is adjusted.As shown in figure 8, having text aobvious in first row several rows reciprocal That shows region is identified as 0, if three text importing area identifications in inverse 2-4 row are 0, and with these three text importing areas In the adjacent the right text importing region in domain, i.e., three text importing area identifications in secondary series inverse 2-4 row are all 1, The mark in three text importing regions in third column inverse 2-4 row is so further judged at this time, if third column are reciprocal The mark in three text importing regions in 2-4 row is all 1, illustrates the text importing region of inverse 2-4 row in first row It may be to be interfered by noise, it, can be by noise remove then the mark in these three text importing regions is set to 1.
In the present embodiment, the ratio that acquisition effective area accounts for text importing region area in the rectangle after filling up is greater than The text importing region of preset ratio is the equal of removing noisy region, and final text information is arranged just in not other In the text importing region of background interference, the accuracy that text information is shown is improved.
Further, the module diagram of the irregular control icons processing unit fourth embodiment of the present invention is proposed.
The fourth embodiment of irregular control icons processing unit and the third of irregular control icons processing unit are implemented The difference of example is that, referring to Fig. 9, the arrangement submodule 32 includes:
Determination unit 321 is greater than the text of the text information for the sum in the text importing region of acquisition When total, determine that the text importing region exceeds the quantity of the text sum;
Arrangement units 322, the text for the hollow remaining quantity out of the predeterminable area in the irregular Background are aobvious Show region, and the text information is sequentially arranged in remaining text importing region.
In the present embodiment, the sum in the text importing region of acquisition is equal to the text sum of the text information When, directly the text information can be arranged successively in each text importing region of acquisition at this time.In the text of acquisition When the sum of display area is greater than the text sum of the text information, determination unit 321 first determines the text importing region Quantity beyond the text sum, in the text importing of the hollow remaining quantity out of the predeterminable area of the irregular Background Region, wherein the predeterminable area can be in the rear and front end of irregular Background, be also possible in irregular Background Intermediate region, if the rear and front end of irregular Background it is vacant go out text importing region, can limit both ends it is vacant go out The text importing region of same number can not also limit the text importing region of the vacant same number out in both ends certainly, as long as two The sum in the final vacant text importing region out in end is equal to the quantity of the determination.Finally, arrangement units 322 will The text information is sequentially arranged in remaining text importing region.
In the present embodiment, the sum in the text importing region of acquisition is greater than the text sum of the text information When, first determine that the text importing region exceeds the quantity of the text sum, then in the default of the irregular Background The text importing region of the hollow remaining quantity out in region, and the text information is sequentially arranged in remaining text importing area In domain, the flexibility of text information typesetting is improved.
Further, the module diagram of irregular the 5th embodiment of control icons processing unit of the present invention is proposed.
5th embodiment of irregular control icons processing unit and the 4th of irregular control icons processing unit implement The difference of example is, referring to Fig.1 0, the irregular control icons processing unit further include:
Determining module 40, for the text envelope in the starting text importing region of every a line or end text importing region When breath is punctuation mark, the type of the punctuation mark is determined, wherein the type of the punctuation mark includes left side punctuate symbol Number, right side punctuation mark and independent punctuation mark;
Module 50 is adjusted, for according with according to starting text importing region or end text importing region and the punctuate Number type, adjust the position of punctuation mark described in the irregular Background.
When in the present embodiment, mainly for line feed, typesetting to text information, wherein mainly according to a line text The all characters of ending character and next line are judged, i.e., according to the difference of punctuation character, to determine how to enter a new line, and to this Style of writing word space is stretched or is compressed.
Firstly, enumerating punctuation mark type:
Left side punctuate include: ", <, " etc.;
Right side punctuate includes: ", >, " etc.;
Independent punctuate includes:,.;,!,? Deng.
The case where for the compression of single punctuate:
If a line drafting terminates, but at the beginning of next line, first character is independent punctuation mark, this feelings Under condition, the word space between lastrow every two character is compressed, be placed on it can just by the punctuate of current row head The end of line of a line.
The case where stretching of word space:
If the last character of a line is left side punctuation mark, the word space of the line character is stretched, The row for making these punctuates appear in next line is first.
The case where multiaspect is compressed:
It may be started in the beginning of next line with right label, and single label occur in second character, such case just will The line character spacing is compressed, and two punctuates of next line are placed on the first row and are shown.
Based on the above analysis, to be best understood from the present embodiment, be exemplified below: current row last character mark uses now_ Char_end is indicated;Next line first character mark is indicated with next_char_first;Second character mark of next line is used Next_char_second is indicated;
Referring to Fig.1 1, if next_char_first is left side character, the first line character is normally shown;
If next_char_first is not left side character, judge whether next_char_first is right side character, if It is to judge whether next_char_second is left side character, is shown if so, next_char_first is placed on the first row, And compress the character pitch of the first row;
If next_char_second is not left side character, judge whether next_char_second is non-punctuate, if so, It is handled next_char_second as independent punctuate;
If next_char_second is not non-punctuate, next_char_first and next_char_second are put It is shown in the first row, and compresses the character pitch of the first row;
If next_char_first is not right side character, judge whether next_char_first is independent punctuate, if Next_char_first is independent punctuate, obtains the first row now_char_end, judges whether now_char_end is left side mark Point is shown if so, now_char_end is placed on next line, and stretches the character pitch of the first row;
If now_char_end is not left side punctuate, the first row normally shows or stretches spacing.
In the present embodiment, when there is punctuation mark in the initiation region of every a line or end region, first determine described in The type of punctuation mark, finally according to initiation region or end region and the type of the punctuation mark, adjustment is described not to be advised The then position of punctuation mark described in Background so that in irregular Background text information show it is more accurate and flexible.
The present invention also provides a kind of irregular control icons processing methods.
2, Figure 12 is the flow diagram of the irregular control icons processing method first embodiment of the present invention referring to Fig.1.
The present embodiment proposes a kind of irregular control icons processing method, the irregular control icons processing method packet It includes:
Step S10 obtains the corresponding irregular Background of text control and text information;
The irregular Background is divided into multiple text importing regions according to preset division mode by step S20;
Step S30, according to the text of the total and described text information in text importing region sum, by the text This information is sequentially arranged in the irregular Background, so that the shape one of the typesetting of text information and irregular Background It causes.
In the present embodiment, the corresponding irregular Background of text control and text information are first obtained, wherein the text This information includes text, character and punctuation mark, and therefore, text, character and punctuation mark are all counted to text sum hereinafter In.Then the irregular Background is divided by multiple text importing regions according to preset division mode, wherein described pre- If division mode be exactly that the irregular Background is divided with pre-set dimension, it is described to be divided into multiple text importing regions Pre-set dimension is set as the case may be, a, default;B, it is changed with text sum, if with text Word sum is changed, then preferably has a size range to be selected, and selects the smallest size to divide before this described irregular Background, to mark off each text importing region, if the text importing region sum divided is far beyond the text information Text sum, can choose the size bigger than current size and divides to the irregular Background, and so on, Zhi Daohua The text importing region separated is close with the text sum of the text information.
It should be understood that the division in the present embodiment is virtual division, it is not really to mark off solid line, but be The virtual grate for facilitating the arrangement of description text information to carry out.
After division obtains each text importing region, according to the total and described text in the text importing region The text sum of information, the text information is sequentially arranged in the irregular Background, so that the typesetting of text information It is consistent with the shape of irregular Background, the text of the total and described text information according to the text importing region Sum, it includes: 1 in the irregular Background, in sequence successively by the text that the text information, which is sequentially arranged in, Information arrangement is in each text importing region of the irregular Background;2, in order to improve the flexible of text information arrangement Property, first determine that the text importing region exceeds the quantity of the text sum, then in the default of the irregular Background The text importing region of the hollow remaining quantity out in region, and the text information is sequentially arranged in remaining text importing area In domain, so that the typesetting of text information is consistent with the shape of irregular Background, wherein the predeterminable area can be irregularly Intermediate region in Background can be two end regions in irregular Background.
In the present embodiment, in order to improve the intelligence that text information is shown, the text shown in each text importing region Word size can be adjusted, and can set a display size at the beginning, if detecting that character size is significantly less than or is less than When the bulk in the text importing region, then the character size in each text importing region can be adjusted.
It is understood that in treated irregular control icons, the type-setting mode of text information and described irregular The shape of Background is consistent, i.e., the text information placement region divided in irregular Background is no longer the region of rule, and It is to be divided according to the shape of the irregular Background, when subsequent placement text information, so that it may according to irregular Placement region arranges text information, specifically can refer to Fig. 4, so that the placement of text information is more intelligent and flexible.
The irregular control icons processing method that the present embodiment proposes first obtains the corresponding irregular Background of text control And text information, the irregular Background is then divided by multiple text importing regions according to preset division mode, Finally according to the text of the total and described text information in text importing region sum, the text information is successively arranged It is listed in the irregular Background, so that the typesetting of text information is consistent with the shape of irregular Background, realizes processing In irregular control icons afterwards, the type-setting mode of text information is consistent with the shape of the irregular Background, rather than Square-folded display text information in control icons, the type-setting mode of text information becomes with irregular Background in the present invention Change, improves the flexibility of irregular control icons processing.
Further, the flow diagram of the irregular control icons processing method second embodiment of the present invention is proposed.
The second embodiment of irregular control icons processing method and the first of irregular control icons processing method are implemented The difference of example is, referring to Fig.1 3, the step S20 includes:
Step S21, according to the longest edge and most length and width of the irregular Background, by the irregular Background fill up for Using the longest edge and the most length and width as the rectangle of side length;
The rectangle filled up is carried out gridding subdivision according to preset size by step S22, more to be divided into The unit area of a equalization;
Step S23 obtains each unit region comprising irregular Background, and each unit region conduct that will acquire Text importing region.
In the present embodiment, the longest edge and most length and width of the irregular Background are first determined, is not then advised according to described The then longest edge of Background and most length and width fill up the irregular Background for using the longest edge and the most length and width as side Long rectangle, specifically can refer to Fig. 6, wherein longest edge is exactly the bottom edge in irregular Background, and most length and width are exactly irregular back The side of scape figure.Then according to preset size, the rectangle filled up is subjected to gridding subdivision, it is multiple to be divided into Impartial unit area, wherein the preset size is size set in advance, such as will be sized to 5mm*5mm, when It so may be set to be other values.It should be understood that gridding subdivision irregular Background can be divided into it is multiple Impartial quadrangle, pentagon, hexagon etc., in the present embodiment, are preferably divided into multiple equalizations for irregular Background Quadrangle, at this time referring again to Fig. 6.
After division obtains each unit region, due to being that the rectangle that will be filled up carries out gridding at the beginning Subdivision, to be divided into the unit area of multiple equalizations, therefore, there is only comprising irregularly carrying on the back in obtained each unit region The unit area of scape figure, there is also each unit regions for not including irregular Background, it is possible to is existed in rectangular edges The unit area of other backgrounds is completely included, at this point, only obtaining each unit region comprising irregular Background, then will be obtained Each unit region taken as text importing region, other each unit regions not comprising irregular Background then not as Text importing region.
It in the present embodiment, is not the distributing position of random division text information, nor square-folded irregular Rectangular area is divided in Background inside, then text information is sequentially arranged in the rectangular area marked off (such as Fig. 1), but It is first that the irregular Background supplement is rectangular, then according still further to preset size, the rectangle filled up is carried out Gridding subdivision, it is final to obtain each unit region comprising irregular Background to be divided into the unit area of multiple equalizations, And each unit region that will acquire, as text importing region, the marginal position realized in irregular Background also can be used as Text importing region, and text information is sequentially arranged in the text importing region of the irregular Background, improve text The flexibility of this information typesetting.
Further, the flow diagram of the irregular control icons processing method 3rd embodiment of the present invention is proposed.
The 3rd embodiment of irregular control icons processing method and the second of irregular control icons processing method are implemented The difference of example is, referring to Fig.1 4, the step S30 includes:
Step S31 obtains text importing area of the ratio greater than preset ratio that effective area accounts for text importing region area Domain, wherein the effective area is the corresponding region area of irregular Background in the text importing region;
Step S32 will according to the text of the total and described text information in the text importing region of acquisition sum The text information is sequentially arranged in the text importing region of acquisition.
From in above-described embodiment it is found that marked off multiple text importing regions in the rectangle, and above-mentioned implementation The text importing region obtained in example is the text importing region comprising irregular Background, then the text importing region obtained Middle may further include the background of page script, i.e., include not only irregular Background, may include the blank background of the page Etc., therefore, show text information in the present embodiment more accurate, i.e., the region without departing from irregular Background is excellent Choosing obtains text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area, noticeable It is that the number in the text importing region of acquisition has to be larger than or total equal to the text of the text information, in the present embodiment The preset ratio is set as the case may be, in order to be shown in text information all in irregular Background Portion can set the preset ratio to 100%, that is, in the rectangle, obtain effective area and account for text importing region The ratio of area reaches 100% text importing region, i.e. the effective area text that is entirely the irregular background graph region Display area realizes and excludes the text importing region including other background areas or page area, finally will be described Text information is sequentially arranged in the text importing region of acquisition.
In the present embodiment, the number in the text importing region of acquisition have to be larger than or equal to the text information text Sum just can guarantee that text information can be all arranged in the irregular Background, if detecting the text of acquisition in this way The number of word display area is less than the text sum of the text information, at this time, it may be necessary to carry out net to the rectangle after filling up again For the size formatted subdivision, also, divided than the size dot again of last time, the unit area quantity of so division can be more, And each unit region comprising irregular Background is equally first obtained, and each unit region that will acquire is aobvious as text Show region, finally obtain text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area again, So that the sum in the text importing region obtained again is greater than or equal to the text sum of the text information, if obtaining again Text importing region sum it is total still less than the text of the text information, then continue to divide, and so on, directly To the text importing region of acquisition sum be greater than or equal to the text information text sum,
Further, the text for being greater than preset ratio in the ratio for getting effective area and accounting for text importing region area is aobvious After showing region, the ratio that effective area can be accounted for text importing region area is greater than the text importing zone marker of preset ratio It is 1, can be used for indicating effective text importing region, and the ratio that effective area accounts for text importing region area is less than or equal in advance If the text importing zone marker of ratio is 0, it can be used for indicating invalid text importing region.
It is best understood from the present embodiment, referring to Fig. 8, the rectangle after filling up carries out gridding subdivision, and it is aobvious to be divided into each text Show region, is then by the text importing area identification that the ratio that effective area accounts for text importing region area reaches preset ratio 1, and be 0 by the text importing area identification comprising other background areas, wherein the text importing region for being identified as 1 is exactly text Text information write-in is finally identified as in 1 each text importing region by this information position to be written, and can from Fig. 8 Out, in finally obtained irregular control icons, the type-setting mode of text information and the irregular Background target shape one It causes.
Further, when being identified to each text importing region, if there are the mark in current character region with When the mark in adjacent text importing region is different, it is likely to be the interference of noise at this time, then first judging adjacent text importing Identifying whether for the adjacent other text importing regions in region text importing adjacent with this region is identical, if they are the same, it is believed that when There are noise interference for preceding character area, and mark is adjusted.As shown in figure 8, having text aobvious in first row several rows reciprocal That shows region is identified as 0, if three text importing area identifications in inverse 2-4 row are 0, and with these three text importing areas In the adjacent the right text importing region in domain, i.e., three text importing area identifications in secondary series inverse 2-4 row are all 1, The mark in three text importing regions in third column inverse 2-4 row is so further judged at this time, if third column are reciprocal The mark in three text importing regions in 2-4 row is all 1, illustrates the text importing region of inverse 2-4 row in first row It may be to be interfered by noise, it, can be by noise remove then the mark in these three text importing regions is set to 1.
In the present embodiment, the ratio that acquisition effective area accounts for text importing region area in the rectangle after filling up is greater than The text importing region of preset ratio is the equal of removing noisy region, and final text information is arranged just in not other In the text importing region of background interference, the accuracy that text information is shown is improved.
Further, the flow diagram of the irregular control icons processing method fourth embodiment of the present invention is proposed.
The fourth embodiment of irregular control icons processing method and the third of irregular control icons processing method are implemented The difference of example is, referring to Fig.1 5, the step S32 includes:
Step S321, when the sum in the text importing region of acquisition is greater than the text sum of the text information, Determine that the text importing region exceeds the quantity of the text sum;
Step S322, the predeterminable area of the irregular Background it is hollow it is remaining go out the quantity text importing region, And the text information is sequentially arranged in remaining text importing region.
In the present embodiment, the sum in the text importing region of acquisition is equal to the text sum of the text information When, directly the text information can be arranged successively in each text importing region of acquisition at this time.In the text of acquisition When the sum of display area is greater than the text sum of the text information, first determine the text importing region beyond the text The quantity of sum, in the text importing region of the hollow remaining quantity out of the predeterminable area of the irregular Background, wherein institute Stating predeterminable area can be the intermediate region being also possible in irregular Background in the rear and front end of irregular Background, If the text of the vacant same number out in both ends can be limited in the vacant text importing region out in the rear and front end of irregular Background Word display area, certainly, can not also limit both ends it is vacant go out same number text importing region, as long as both ends it is final it is vacant go out Text importing region sum be equal to the determination the quantity.Finally, the text information is sequentially arranged in In remaining text importing region.
In the present embodiment, the sum in the text importing region of acquisition is greater than the text sum of the text information When, first determine that the text importing region exceeds the quantity of the text sum, then in the default of the irregular Background The text importing region of the hollow remaining quantity out in region, and the text information is sequentially arranged in remaining text importing area In domain, the flexibility of text information typesetting is improved.
Further, the flow diagram of irregular the 5th embodiment of control icons processing method of the present invention is proposed.
5th embodiment of irregular control icons processing method and the 4th of irregular control icons processing method implement The difference of example is, referring to Fig.1 6, after the step S30, and the irregular control icons processing method further include:
Step S40, the text information in the starting text importing region of every a line or end text importing region are mark When point symbol, the type of the punctuation mark is determined, wherein the type of the punctuation mark includes left side punctuation mark, right side Punctuation mark and independent punctuation mark;
Step S50, according to starting text importing region or end text importing region and the class of the punctuation mark Type adjusts the position of punctuation mark described in the irregular Background.
When in the present embodiment, mainly for line feed, typesetting to text information, wherein mainly according to a line text The all characters of ending character and next line are judged, i.e., according to the difference of punctuation character, to determine how to enter a new line, and to this Style of writing word space is stretched or is compressed.
Firstly, enumerating punctuation mark type:
Left side punctuate include: ", <, " etc.;
Right side punctuate includes: ", >, " etc.;
Independent punctuate includes:,.;,!,? Deng.
The case where for the compression of single punctuate:
If a line drafting terminates, but at the beginning of next line, first character is independent punctuation mark, this feelings Under condition, the word space between lastrow every two character is compressed, be placed on it can just by the punctuate of current row head The end of line of a line.
The case where stretching of word space:
If the last character of a line is left side punctuation mark, the word space of the line character is stretched, The row for making these punctuates appear in next line is first.
The case where multiaspect is compressed:
It may be started in the beginning of next line with right label, and single label occur in second character, such case just will The line character spacing is compressed, and two punctuates of next line are placed on the first row and are shown.
Based on the above analysis, to be best understood from the present embodiment, be exemplified below: current row last character mark uses now_ Char_end is indicated;Next line first character mark is indicated with next_char_first;Second character mark of next line is used Next_char_second is indicated;
Referring to Fig.1 1, if next_char_first is left side character, the first line character is normally shown;
If next_char_first is not left side character, judge whether next_char_first is right side character, if It is to judge whether next_char_second is left side character, is shown if so, next_char_first is placed on the first row, And compress the character pitch of the first row;
If next_char_second is not left side character, judge whether next_char_second is non-punctuate, if so, It is handled next_char_second as independent punctuate;
If next_char_second is not non-punctuate, next_char_first and next_char_second are put It is shown in the first row, and compresses the character pitch of the first row;
If next_char_first is not right side character, judge whether next_char_first is independent punctuate, if Next_char_first is independent punctuate, obtains the first row now_char_end, judges whether now_char_end is left side mark Point is shown if so, now_char_end is placed on next line, and stretches the character pitch of the first row;
If now_char_end is not left side punctuate, the first row normally shows or stretches spacing.
In the present embodiment, when there is punctuation mark in the initiation region of every a line or end region, first determine described in The type of punctuation mark, finally according to initiation region or end region and the type of the punctuation mark, adjustment is described not to be advised The then position of punctuation mark described in Background so that in irregular Background text information show it is more accurate and flexible.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include the other elements being not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of irregular control icons processing unit, which is characterized in that the irregular control icons processing unit includes:
Module is obtained, for obtaining the corresponding irregular Background of text control and text information;
Division module, for the irregular Background to be divided into multiple text importing regions according to preset division mode;
Module is arranged, the text for the total and described text information according to the text importing region is total, will be described Text information is sequentially arranged in the irregular Background, so that the shape one of the typesetting of text information and irregular Background It causes;
Wherein, the arrangement module is also used to determine text sum of the text importing region beyond the text information Quantity, the predeterminable area of the irregular Background it is hollow it is remaining go out the quantity text importing region, and by the text Information is sequentially arranged in remaining text importing region.
2. control icons processing unit as described in claim 1 irregular, which is characterized in that the division module includes:
Submodule is filled up, for the longest edge and most length and width according to the irregular Background, the irregular Background is filled out It mends as using the longest edge and the most length and width as the rectangle of side length;
Submodule is divided, for the rectangle filled up being carried out gridding subdivision, to be divided into according to preset size The unit area of multiple equalizations;
Submodule is handled, for obtaining each unit region comprising irregular Background, and each unit region that will acquire As text importing region.
3. control icons processing unit as claimed in claim 2 irregular, which is characterized in that the arrangement module includes:
Acquisition submodule, the ratio that text importing region area is accounted for for obtaining effective area are greater than the text importing of preset ratio Region, wherein the effective area is the corresponding region area of irregular Background in the text importing region;
Submodule is arranged, the text for the total and described text information according to the text importing region of acquisition is total Number, the text information is sequentially arranged in the text importing region of acquisition.
4. control icons processing unit as claimed in claim 3 irregular, which is characterized in that the arrangement submodule includes:
Determination unit, when being greater than the text sum of the text information for the sum in the text importing region of acquisition, Determine that the text importing region exceeds the quantity of the text sum;
Arrangement units, for the predeterminable area in the irregular Background it is hollow it is remaining go out the quantity text importing region, And the text information is sequentially arranged in remaining text importing region.
5. irregular control icons processing unit according to any one of claims 1-4, which is characterized in that the irregular control Part icon processing unit further include:
Determining module is mark for the text information in the starting text importing region of every a line or end text importing region When point symbol, the type of the punctuation mark is determined, wherein the type of the punctuation mark includes left side punctuation mark, right side Punctuation mark and independent punctuation mark;
Module is adjusted, for the class according to starting text importing region or end text importing region and the punctuation mark Type adjusts the position of punctuation mark described in the irregular Background.
6. a kind of irregular control icons processing method, which is characterized in that the irregular control icons processing method includes:
Obtain the corresponding irregular Background of text control and text information;
The irregular Background is divided into multiple text importing regions according to preset division mode;
According to the text of the total and described text information in text importing region sum, the text information is successively arranged It is listed in the irregular Background, so that the typesetting of text information is consistent with the shape of irregular Background;
Wherein, the text sum of the total and described text information according to the text importing region, by the text Information is sequentially arranged in the step in the irregular Background, comprising:
The quantity for determining text sum of the text importing region beyond the text information, in the irregular Background The text importing region of the hollow remaining quantity out of predeterminable area, and the text information is sequentially arranged in remaining text and is shown Show in region.
7. irregular control icons processing method as claimed in claim 6, which is characterized in that described according to preset division side The step of irregular Background is divided into multiple text importing regions by formula include:
According to the longest edge and most length and width of the irregular Background, the irregular Background is filled up as with the longest edge It is the rectangle of side length with the most length and width;
According to preset size, the rectangle filled up is subjected to gridding subdivision, to be divided into the unit of multiple equalizations Region;
Each unit region comprising irregular Background is obtained, and each unit region that will acquire is as text importing area Domain.
8. irregular control icons processing method as claimed in claim 7, which is characterized in that described according to the text importing The text sum of the total and described text information in region, is sequentially arranged in the irregular Background for the text information In step include:
Obtain text importing region of the ratio greater than preset ratio that effective area accounts for text importing region area, wherein described Effective area is the corresponding region area of irregular Background in the text importing region;
According to the text of the total and described text information in the text importing region of acquisition sum, by the text information It is sequentially arranged in the text importing region of acquisition.
9. irregular control icons processing method as claimed in claim 8, which is characterized in that the text according to acquisition The text sum of the total and described text information of word display area, the text information is sequentially arranged in described in acquisition Step in text importing region includes:
When sum in the text importing region of acquisition is greater than the text sum of the text information, determine that the text is aobvious Show that region exceeds the quantity of the text sum;
The predeterminable area of the irregular Background it is hollow it is remaining go out the quantity text importing region, and by the text envelope Breath is sequentially arranged in remaining text importing region.
10. irregular control icons processing method as claim in any one of claims 6-9, which is characterized in that described according to institute State the quantity in text importing region and the text sum of the text information, by the text information be sequentially arranged in it is described not After step in regular Background, the irregular control icons processing method further include:
When text information in the starting text importing region of every a line or end text importing region is punctuation mark, determine The type of the punctuation mark, wherein the type of the punctuation mark includes left side punctuation mark, right side punctuation mark and independence Punctuation mark;
According to starting text importing region or end text importing region and the type of the punctuation mark, adjustment is described not The position of punctuation mark described in regular Background.
CN201610363369.8A 2016-05-27 2016-05-27 Irregular control icons processing unit and method Active CN106095744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610363369.8A CN106095744B (en) 2016-05-27 2016-05-27 Irregular control icons processing unit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610363369.8A CN106095744B (en) 2016-05-27 2016-05-27 Irregular control icons processing unit and method

Publications (2)

Publication Number Publication Date
CN106095744A CN106095744A (en) 2016-11-09
CN106095744B true CN106095744B (en) 2019-01-08

Family

ID=57230121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610363369.8A Active CN106095744B (en) 2016-05-27 2016-05-27 Irregular control icons processing unit and method

Country Status (1)

Country Link
CN (1) CN106095744B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112140354B (en) * 2019-06-27 2023-08-22 厦门链石网络科技股份有限公司 Typesetting method for stone large plate
CN110264017B (en) * 2019-06-28 2022-02-15 阳光新能源开发股份有限公司 Photovoltaic component arrangement method and photovoltaic array construction determination method
CN112672198B (en) * 2020-12-14 2022-11-22 海看网络科技(山东)股份有限公司 EPG (electronic program guide) special-shaped graph display method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558340A (en) * 2004-02-06 2004-12-29 珠海金山软件股份有限公司 Typesetting method
CN1828581A (en) * 2006-04-14 2006-09-06 北京北大方正电子有限公司 Layout method for word content fitting rectangular words frame
CN1920811A (en) * 2006-08-31 2007-02-28 北京北大方正电子有限公司 Character typesetting method
CN1952923A (en) * 2006-11-22 2007-04-25 北京北大方正电子有限公司 A typesetting method of character in monotonic range
CN101937569A (en) * 2009-06-30 2011-01-05 北京大学 Character laydown method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558340A (en) * 2004-02-06 2004-12-29 珠海金山软件股份有限公司 Typesetting method
CN1828581A (en) * 2006-04-14 2006-09-06 北京北大方正电子有限公司 Layout method for word content fitting rectangular words frame
CN1920811A (en) * 2006-08-31 2007-02-28 北京北大方正电子有限公司 Character typesetting method
CN1952923A (en) * 2006-11-22 2007-04-25 北京北大方正电子有限公司 A typesetting method of character in monotonic range
CN101937569A (en) * 2009-06-30 2011-01-05 北京大学 Character laydown method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Using Genetic Algorithms to Solve Luggage Typesetting Problem;Shao-lun Lee等;《IEEE Congress on Evolution Computation》;20070928;第2886-2892页
基于矩形Packing问题求解的页面自动排版方法;李治江等;《山东农业大学学报(自然科学版)》;20160408;第47卷(第2期);第264-268页

Also Published As

Publication number Publication date
CN106095744A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN105511680B (en) Terminal screen touch device and method
CN107092453B (en) Screen display control method and device and terminal
WO2019085821A1 (en) Processing method, device, apparatus, and machine-readable medium
US20140189597A1 (en) Method and electronic device for presenting icons
CN107132946A (en) Fingerprint recognition based reminding method, device, storage medium and computer equipment
CN106055252B (en) Mobile terminal and its split screen display available processing method
US20180324459A1 (en) Method and device for compressing image, and electronic device
KR20160005609A (en) Method for displaying graphic user interface and electronic device supporting the same
KR20150024650A (en) Method and apparatus for providing visualization of sound in a electronic device
US11995747B2 (en) Method for generating identification pattern and terminal device
CN106095744B (en) Irregular control icons processing unit and method
CN105867728B (en) A kind of man-machine interface display system and method
CN106502493A (en) A kind of multi-screen display method and terminal
CN106095477A (en) Application erecting device and method
CN107292141A (en) A kind of authentication means, terminal and method
CN105446523A (en) Method and apparatus for inputting object in electronic device
CN108427586A (en) Using push terminal, method and the computer readable storage medium of theme
CN103093780A (en) Method And Apparatus For Controlling Playback Speed Of Animation Message In Mobile Terminal
CN109388309A (en) Display methods, device, terminal and the storage medium of menu
CN106843642A (en) The exchange method and mobile terminal of a kind of mobile terminal
US20160154545A1 (en) Electronic device and method for managing and displaying application icons
CN105786881A (en) Self-adaptive electronic book and magazine file structure and corresponding methods and devices
CN106793026A (en) A kind of method and terminal for realizing reporting events treatment
CN106527806A (en) Method and device for realizing touch control processing
WO2019085810A1 (en) Processing method, device, apparatus, and machine-readable medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant