Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearlyChu, intactly description, obviously, described embodiment is the present invention's part embodiment, instead of allEmbodiment. Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative laborThe every other embodiment obtaining under moving prerequisite, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of method and mobile terminal of content typesetting, can be according to touching of receivingScreen trace information, writes definite content typesetting region by object content, so that reduce manually content to be enteredThe difficulty of row typesetting, increases the interest of content with readable. Below be elaborated respectively.
Fig. 1 is the flow chart of a kind of content typesetting method in the embodiment of the present invention, and the embodiment of the present invention has realizedObject content is carried out to the scheme of Automatic Typesetting according to specifically putting in order. Described in of the present invention as shown in the figureMethod at least comprises:
Step S101, receives the touch screen trace information that user inputs in screen, described touch screen trace information bagDraw together at least one touch screen track.
Before the touch screen trace information that reception user inputs in screen, obtain object content, this object contentCan be word or the picture that user inputs, can be also note or the mail etc. forwarding. Wherein in this targetAppearance can comprise one or more in target text and Target Photo, and touch screen trace information can comprise at leastA touch screen track, described touch screen track can be straight path, curvilinear path or dog-leg path.
As the optional embodiment of one, this touch screen trace information can also comprise corresponding suitable of touch screen trackOrder information, wherein order information can be the information of the multiple touch screen track orders of the identification such as time marking or numbering.
As the optional embodiment of one, before the touch screen trace information that reception user inputs in screen,The matrix parameter that can set according to user is determined the content typesetting square being made up of multiple subregions in screenThe system of battle formations, wherein this subregion can be the regions such as square, rectangle, regular hexagon.
Step S102, according to described at least one touch screen track receiving, determines content typesetting region.
According at least one the touch screen track receiving, determine content typesetting region, so that according to touch screen railMark information, writes this content typesetting region by object content.
As the optional embodiment of one, in screen, determine the content typesetting square being formed by multiple subregionsAfter the system of battle formations, can be according to the touch screen trace information receiving, determine the content row that touch screen trace information is correspondingSubregion in version matrix diagram, and by the subregion in content typesetting matrix diagram corresponding this touch screen trace informationIn at least one subregion be defined as content typesetting region.
In specific implementation, in the time that the touch screen track receiving cannot correctly be determined content typesetting region, can be byThis touch screen track abandons, and does not carry out determining of content typesetting region. For example, this object content is Target Photo,And touch screen track is straight line or not when closed curve, cannot determine the particular location in content typesetting region,This touch screen track can be abandoned.
Touch screen track can as shown in Figure 9, have been determined the content being made up of multiple identical square in screenTypesetting matrix diagram, and touch screen track is during through the frame of the subregion in content typesetting matrix diagram, Wu FazhengReally identification content typesetting region, can abandon this touch screen track; If this object content is Target Photo, touchThe subregion that comprises of screen track is L-type, when quadrangle that cannot formation rule, can not determine content typesettingThe particular location in region, can abandon this touch screen track; If this object content is target text, touch screen railMark pass through respectively subregion 1., subregion 2., subregion 3., subregion 4., subregion 5., subregion 6.And subregion is 7., wherein touch screen track pass through simultaneously subregion 2. with subregion 3., in target textWord write subregion 1. after, cannot judge that second word in target text is to write subregion 2.,Still write subregion 3., also cannot be by second word in target text according to comprising subregion 2. and sonContent typesetting region 3., region stretches, and this touch screen track can be abandoned.
Step S103, according to the described touch screen trace information receiving, writes described content row by object contentVersion region.
In specific implementation, while receiving a touch screen track, directly object content is write to definite content rowVersion region; While receiving multiple touch screen track, can determine the order information that touch screen track is corresponding, according to reallyFixed order information corresponding to touch screen track, writes definite content typesetting region by object content.
As the optional embodiment of one, when this object content is target text, can further judges and connectWhether the touch screen track in the touch screen trace information of receiving passes through multiple subregions in vertical direction.
When the touch screen track in the touch screen trace information receiving is during in vertical direction through a sub regions,The order information corresponding according to touch screen track, writes definite content typesetting region by object content.
In the time that the touch screen track in the touch screen trace information receiving passes through multiple subregion in vertical direction,According to the multiple subregions of process in vertical direction of the touch screen track in touch screen trace information, by target literary compositionWord stretches, and the target text after stretching is write to content typesetting region.
In content typesetting matrix diagram, stretched target text can be as shown in figure 10, if the touch screen receivingTouch screen track along continuous straight runs in trace information slides, and wherein touch screen track is in vertical direction through twoSubregion, in the horizontal direction of the sub regions of touch screen track in described two sub regions through six sonsRegion, the touch screen trace information of inputting in screen according to the user who receives, definite content typesetting districtTerritory is 2 × 6 matrix, target text is carried out to longitudinal stretching, makes each the target text energy after stretchingEnough fill up two sub regions, and the target text after stretching is write to the content typesetting region of matrix 2 × 6. IfTouch screen track in the touch screen trace information receiving slides along plumb line direction, and wherein touch screen track is verticallyIn direction through two sub regions, the plumb line of the sub regions of touch screen track in described two sub regionsIn direction through six sub regions, the touch screen trace information of inputting in screen according to the user that receives,Definite content typesetting region is 6 × 2 matrix, target text is carried out to cross directional stretch, makes after stretchingEach target text can be filled up two sub regions, and the target text after stretching is write to matrix 6 × 2Content typesetting region.
As the optional embodiment of one, when this object content is Target Photo, according to definite content rowVersion region, regulates the size of Target Photo, and the Target Photo after regulating is write to content typesetting region.
The content typesetting region that comprises object content can be as shown in figure 11, and by target text, " a kind of content is arrangedMethod and the mobile terminal of version " write one by one content typesetting region, when content typesetting region writes target textAfter " a kind of content typesetting ", do not have unnecessary content typesetting region can write target text, will remainRemaining target text " method and mobile terminal " abandons; When target text " a kind of method of content typesetting andMobile terminal " all write behind content typesetting region, content typesetting region is not filled up completely, will not haveThere is the content typesetting region of filling target text to abandon. If Target Photo comprises a picture, and content rowWhen version region comprises two touch screen tracks, the order information corresponding according to touch screen track, adjusts Target PhotoSave into the size in the content typesetting region definite according to first touch screen track, and by the Target Photo after regulatingWrite the content typesetting region definite according to first touch screen track, by what determine according to second touch screen trackContent typesetting region abandons.
As the optional embodiment of one, object content is write behind content typesetting region, can be according to useInstruction is confirmed in the typesetting of family input, confirms the typesetting of object content. If this object content is note, Ke YijinOne step judges whether the content after typesetting comprises picture, if the content after typesetting comprises picture, by after typesettingContent send by the mode of multimedia message; If the content after typesetting does not comprise picture, by the content after typesettingMode by normal short message sends.
In the described content typesetting method of Fig. 1, receive the touch screen trace information that user inputs in screen;According to this touch screen trace information, determine content typesetting region; And according to this touch screen trace information, in targetHold and write content typesetting region. The embodiment of the present invention can be according to the touch screen trace information receiving, in targetHold and write definite content typesetting region, so that reduce the difficulty of manually content being carried out to typesetting, in increaseThe interest of holding is with readable.
Fig. 2 is the flow chart of another kind of content typesetting method in the embodiment of the present invention, wherein this content typesetting sideObject content in method is target text, and described method can comprise the following steps:
Step S201, obtains object content.
Obtain the object content for typesetting, this object content can be word or the picture that user inputs, alsoCan be note or the mail etc. forwarding.
Step S202 determines the content typesetting matrix diagram being made up of multiple subregions in screen.
The matrix parameter of setting according to user is determined the content typesetting square being made up of multiple subregions in screenThe system of battle formations, wherein this subregion can be the regions such as square, rectangle, regular hexagon.
Step S203, receives the touch screen trace information that user inputs in content typesetting matrix diagram.
After determining content typesetting matrix diagram, receive the touch screen track that user inputs in content typesetting matrix diagramInformation, wherein this touch screen trace information can comprise at least one touch screen track and corresponding order information thereof,Described touch screen track can be straight path, curvilinear path or dog-leg path, when described order information can beBetween the information of mark or the multiple touch screen tracks orders of the identification such as numbering.
Step S204, according to touch screen trace information, determines content typesetting region.
According at least one the touch screen track in touch screen trace information, at least one by content typesetting matrix diagramSub regions is defined as content typesetting region.
As the optional embodiment of one, in screen, determine the content typesetting square being formed by multiple subregionsAfter the system of battle formations, can be according to the touch screen trace information receiving, determine the content row that touch screen trace information is correspondingSubregion in version matrix diagram, and by the subregion in content typesetting matrix diagram corresponding this touch screen trace informationIn at least one subregion be defined as content typesetting region.
In specific implementation, in the time that the touch screen track receiving cannot correctly be determined content typesetting region, can be byThis touch screen track abandons, and does not carry out determining of content typesetting region.
Touch screen track can as shown in Figure 9, have been determined the content being made up of multiple identical square in screenTypesetting matrix diagram, and touch screen track is during through the frame of the subregion in content typesetting matrix diagram, Wu FazhengReally identification content typesetting region, can abandon this touch screen track; If touch screen track pass through respectively subregion 1.,Subregion 2., subregion 3., subregion 4., subregion 5., subregion 6. and subregion 7., wherein touchScreen track pass through simultaneously subregion 2. with subregion 3., 1. first word in target text writes subregionAfter, cannot judge that second word in target text is to write subregion 2., still write subregion 3.,Also cannot by second word in target text according to comprise subregion 2. with subregion content typesetting district 3.Territory stretches, and this touch screen track can be abandoned.
Step S205, writes content typesetting region by target text.
When this object content is target text, can determine the order information that touch screen track is corresponding, according to determiningTouch screen trace information in order information corresponding to touch screen track, target text is write to content typesetting region.
As the optional embodiment of one, before target text is write to content typesetting region, can enter oneWhether the touch screen track in the touch screen trace information that step judgement receives passes through multiple subareas in vertical directionTerritory.
If the touch screen track in the touch screen trace information receiving is in vertical direction through a sub regions,According to order information corresponding to touch screen track in touch screen trace information, object content is write to definite contentOne layout region.
If the touch screen track in the touch screen trace information receiving passes through multiple subregions in vertical direction,According to the multiple subregions of process in vertical direction of the touch screen track in touch screen trace information, by target textStretch, and the target text after stretching is write to content typesetting region.
In content typesetting matrix diagram, stretched target text can be as shown in figure 10, if the touch screen receivingTouch screen track along continuous straight runs in trace information slides, and wherein touch screen track is in vertical direction through twoSubregion, in the horizontal direction of the sub regions of touch screen track in described two sub regions through six sonsRegion, the touch screen trace information of inputting in screen according to the user who receives, definite content typesetting districtTerritory is 2 × 6 matrix, target text is carried out to longitudinal stretching, makes each the target text energy after stretchingEnough fill up two sub regions, and the target text after stretching is write to the content typesetting region of matrix 2 × 6. IfTouch screen track in the touch screen trace information receiving slides along plumb line direction, and wherein touch screen track is verticallyIn direction through two sub regions, the plumb line of the sub regions of touch screen track in described two sub regionsThrough six sub regions, according to receiving the touch screen trace information that user inputs in screen, true in directionFixed content typesetting region is 6 × 2 matrix, target text is carried out to cross directional stretch, makes every after stretchingA target text can be filled up two sub regions, and by stretch after target text write matrix 6 × 2 inHold one layout region.
Target text is write to content typesetting region one by one, when content typesetting region is filled up by target text, andAnd when target text does not all write content typesetting region, remaining target text is abandoned; When allTarget text has all write content typesetting region, and content typesetting region is not while being filled up completely, willThe content typesetting region of not filling target text abandons.
As the optional embodiment of one, target text is write behind content typesetting region, can be according to useInstruction is confirmed in the typesetting of family input, confirms the typesetting of target text. If this target text is note, Ke YijinOne step judges whether the content after typesetting comprises picture, if the content after typesetting comprises picture, by after typesettingContent send by the mode of multimedia message; If the content after typesetting does not comprise picture, by the content after typesettingMode by normal short message sends.
In the described content typesetting method of Fig. 2, the matrix parameter of setting according to user, true in screenThe fixed content typesetting matrix diagram being formed by multiple subregions; Reception user inputs in content typesetting matrix diagramTouch screen trace information; According to this touch screen trace information, determine content typesetting region; And according to this touch screen trackInformation, writes content typesetting region by target text. The embodiment of the present invention can be according to the touch screen track receivingInformation, writes definite content typesetting region by target text, manually target text is carried out so that reduceThe difficulty of typesetting, increases the interest of content with readable.
Fig. 3 is the flow chart of another kind of content typesetting method in the embodiment of the present invention, wherein this content typesetting sideObject content in method is Target Photo, and described method can comprise the following steps:
Step S301, obtains object content.
Obtain the object content for typesetting, this object content can be word or the picture that user inputs, alsoCan be note or the mail etc. forwarding.
Step S302 determines the content typesetting matrix diagram being made up of multiple subregions in screen.
The matrix parameter of setting according to user is determined the content typesetting square being made up of multiple subregions in screenThe system of battle formations, wherein this subregion can be the regions such as square, rectangle, regular hexagon.
Step S303, receives the touch screen trace information that user inputs in content typesetting matrix diagram.
After determining content typesetting matrix diagram, receive the touch screen track that user inputs in content typesetting matrix diagramInformation, wherein this touch screen trace information can comprise at least one touch screen track and corresponding order information thereof,Described touch screen track can be straight path, curvilinear path or dog-leg path, when described order information can beBetween the information of mark or the multiple touch screen tracks orders of the identification such as numbering.
Step S304, according to touch screen trace information, determines content typesetting region.
According at least one the touch screen track in touch screen trace information, at least one by content typesetting matrix diagramSub regions is defined as content typesetting region.
As the optional embodiment of one, in screen, determine the content typesetting square being formed by multiple subregionsAfter the system of battle formations, can be according to the touch screen trace information receiving, determine the content row that touch screen trace information is correspondingSubregion in version matrix diagram, and by the subregion in content typesetting matrix diagram corresponding this touch screen trace informationIn at least one subregion be defined as content typesetting region.
In specific implementation, in the time that the touch screen track receiving cannot correctly be determined content typesetting region, can be byThis touch screen track abandons, and does not carry out determining of content typesetting region. For example, touch screen track is straight line or does not closeWhile closing curve, cannot determine the particular location in content typesetting region, this touch screen track can be abandoned; At screenIn curtain, determined the content typesetting matrix diagram being formed by multiple identical subregions, and touch screen track is through contentWhen the frame of the subregion in typesetting matrix diagram, cannot correctly identify content typesetting region, can be by this touch screenTrack abandons; In screen, determine the content typesetting matrix diagram being formed by multiple identical subregions, and touchedThe subregion of screen track process cannot formation rule quadrangle time, can not determine the tool in content typesetting regionBody position, can abandon this touch screen track.
Step S305, according to content typesetting region, regulates the size of Target Photo.
According to definite content typesetting region, regulate the size of Target Photo.
Step S306, writes content typesetting region by the Target Photo after regulating.
Determine the order information that touch screen track is corresponding, according to the touch screen track pair in definite touch screen trace informationThe order information of answering, writes content typesetting region by the Target Photo after regulating.
Target Photo is write to content typesetting region one by one, when content typesetting region is filled up by Target Photo, andAnd when Target Photo does not all write content typesetting region, remaining Target Photo is abandoned; When allTarget Photo has all write content typesetting region, and content typesetting region is not while being filled up completely, willThe content typesetting region of not filling Target Photo abandons.
As the optional embodiment of one, Target Photo is write behind content typesetting region, can be according to useInstruction is confirmed in the typesetting of family input, confirms the typesetting of Target Photo. If this Target Photo is note, will arrangeContent after version sends by the mode of multimedia message.
In the described content typesetting method of Fig. 3, the matrix parameter of setting according to user, true in screenThe fixed content typesetting matrix diagram being formed by multiple subregions; Reception user inputs in content typesetting matrix diagramTouch screen trace information; According to this touch screen trace information, determine content typesetting region; And according to this touch screen trackInformation, writes content typesetting region by Target Photo. The embodiment of the present invention can be according to the touch screen track receivingInformation, writes definite content typesetting region by Target Photo, manually Target Photo is carried out so that reduceThe difficulty of typesetting, increases the interest of content with readable.
The embodiment of the present invention can, simultaneously in conjunction with Fig. 2 and Fig. 3, realize content typesetting region and comprise target textTypesetting with Target Photo.
Fig. 4 is the structure chart of a kind of mobile terminal in the embodiment of the present invention, and this mobile terminal can comprise intelligenceMobile phone, the equipment such as palm PC, the mobile terminal in the embodiment of the present invention at least can comprise rail as shown in the figureMark information receiving module 401, one layout region determination module 402 and object content writing module 403, wherein
Trace information receiver module 401, the touch screen trace information of inputting at screen for receiving user, described inTouch screen trace information comprises at least one touch screen track, and wherein said touch screen track can be straight path, songLine tracking or dog-leg path. Trace information receiver module 401 receives the touch screen track that user inputs in screenBefore information, can obtain object content, wherein this object content can be word or the picture that user inputs,Also can be note or the mail etc. forwarding;
As the optional embodiment of one, the touch screen trace information that trace information receiver module 401 receivesCan also comprise the order information that touch screen track is corresponding, wherein order information can be time marking or numbering etc.Identify the information of multiple touch screen track orders.
One layout region determination module 402, at least one for receiving according to trace information receiver module 401Touch screen track, determines content typesetting region;
When the touch screen track receiving when trace information receiver module 401 cannot correctly be determined content typesetting region,One layout region determination module 402 can abandon this touch screen track, does not carry out determining of content typesetting region. ExampleAs, this object content is Target Photo, and the touch screen track that trace information receiver module 401 receives isWhen straight line or not closed curve, cannot determine the particular location in content typesetting region, one layout region determination module402 can abandon this touch screen track.
Object content writing module 403, for the touch screen track receiving according to trace information receiver module 401Information, writes the definite content typesetting region of one layout region determination module 402 by object content.
As the optional embodiment of one, the object content writing module 403 in the embodiment of the present invention canAs shown in Figure 5, further comprise:
Order information determining unit 501, for the touch screen track of determining that trace information receiver module 401 receivesCorresponding order information.
Object content writing unit 502, for the touch screen track pair definite according to order information determining unit 501The order information of answering, writes described content typesetting region by described object content.
As the optional embodiment of one, the mobile terminal in the embodiment of the present invention can also comprise:
Matrix diagram determination module 404, for according to user set matrix parameter, in described screen determine byThe content typesetting matrix diagram of multiple identical subregion compositions, and trigger 401 receptions of trace information receiver module and useThe touch screen trace information that family is inputted in the content typesetting matrix diagram of described screen. Wherein this subregion can beThe regions such as square, rectangle, regular hexagon.
As the optional embodiment of one, the one layout region determination module 402 in the embodiment of the present invention canAs shown in Figure 6, further comprise:
Subregion determining unit 601, for the touch screen track letter receiving according to trace information receiver module 401Breath, determines the subregion in the described content typesetting matrix diagram that described touch screen trace information is corresponding;
One layout region determining unit 602, for by touch screen trace information pair definite subregion determining unit 601In subregion in the described content typesetting matrix diagram of answering, at least one subregion is defined as content typesetting region.
As the optional embodiment of one, the object content in the embodiment of the present invention can comprise target textOne or more with in Target Photo, wherein
When object content comprises target text, the object content writing module 403 in the embodiment of the present invention canAs shown in Figure 7, further comprise:
Subregion determining unit 701, for the touch screen track letter of determining that trace information receiver module 401 receivesTouch screen track in breath passes through multiple subregions in vertical direction.
Target text draw unit 702, determines trace information receiver module for subregion determining unit 701When touch screen track in the 401 touch screen trace informations that receive passes through multiple subregion in vertical direction, according toTouch screen track in the touch screen trace information that trace information receiver module 401 receives passes through in vertical directionMultiple subregions, target text is stretched.
Target text writing unit 703, writes for the target text after target text draw unit 702 is stretchedEnter the definite content typesetting region of one layout region determination module 402;
Target text is write one by one content typesetting region by target text writing unit 703, when content typesetting districtTerritory is filled up by target text, and target text is not while all writing content typesetting region, by remainingTarget text abandons; When target complete word has all write content typesetting region, and content typesetting region does not haveHave while being filled up completely, the content typesetting region of not filling target text is abandoned.
When object content comprises Target Photo, the object content writing module 403 in the embodiment of the present invention canAs shown in Figure 8, further comprise:
Picture regulon 801, for the content typesetting region definite according to one layout region determination module 402,Regulate the size of described Target Photo.
Target Photo writing unit 802, writes institute for the Target Photo after picture regulon 801 is regulatedState the definite content typesetting region of one layout region determination module 402;
Target Photo is write one by one content typesetting region by Target Photo writing unit 802, when content typesetting districtTerritory is filled up by Target Photo, and Target Photo is not while all writing content typesetting region, by remainingTarget Photo abandons; When target complete picture has all write content typesetting region, and content typesetting region does not haveHave while being filled up completely, the content typesetting region of not filling Target Photo is abandoned.
In the described mobile terminal of Fig. 4, Fig. 5, Fig. 6, Fig. 7 and Fig. 8, matrix diagram determination module404 matrix parameter of setting according to user are determined the content typesetting being made up of multiple identical subregions in screenMatrix diagram; Trace information receiver module 401 receives user the definite content row of matrix diagram determination module 404The touch screen trace information of inputting in version matrix diagram; One layout region determination module 402 receives mould according to trace informationThe touch screen trace information that piece 401 receives, determines content typesetting region; 403 of object content writing modulesThe touch screen trace information receiving according to trace information receiver module 401, writes content typesetting district by object contentTerritory. The embodiment of the present invention can, according to the touch screen trace information receiving, write definite content by object contentOne layout region, so that reduce the difficulty of manually content being carried out to typesetting, the interest of increase content and readableProperty.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,Be can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in computerIn read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory,Or random store-memory body (RandomAccessMemory, RAM) etc. ROM).
Step in embodiment of the present invention method can be carried out according to actual needs order and adjusted, merges and delete.
Module in embodiment of the present invention device or unit can merge according to actual needs, divide and deleteSubtract.
Module described in the embodiment of the present invention or unit, can pass through universal integrated circuit, for example CPU(CentralProcessingUnit, central processing unit), or pass through ASIC(ApplicationSpecificIntegratedCircuit, special IC) realize.
It should be noted that, in the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, certainIn embodiment, there is no the part of describing in detail, can be referring to the associated description of other embodiment. Secondly, abilityField technique personnel also should know, the embodiment described in description all belongs to preferred embodiment, relatedAction and module might not be that the present invention is necessary.
The method of the content typesetting above embodiment of the present invention being provided and mobile terminal have carried out detailed JieContinue, applied specific case herein principle of the present invention and embodiment are set forth, above enforcementThe explanation of example is just for helping to understand method of the present invention and core concept thereof; Meanwhile, for this areaThose skilled in the art, according to thought of the present invention, all can change in specific embodiments and applicationsPart, in sum, this description should not be construed as limitation of the present invention.