CN103186912A - Method and system for showing letter in picture format - Google Patents

Method and system for showing letter in picture format Download PDF

Info

Publication number
CN103186912A
CN103186912A CN2011104483799A CN201110448379A CN103186912A CN 103186912 A CN103186912 A CN 103186912A CN 2011104483799 A CN2011104483799 A CN 2011104483799A CN 201110448379 A CN201110448379 A CN 201110448379A CN 103186912 A CN103186912 A CN 103186912A
Authority
CN
China
Prior art keywords
literal
picture
text
shows
showing
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.)
Granted
Application number
CN2011104483799A
Other languages
Chinese (zh)
Other versions
CN103186912B (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN201110448379.9A priority Critical patent/CN103186912B/en
Publication of CN103186912A publication Critical patent/CN103186912A/en
Application granted granted Critical
Publication of CN103186912B publication Critical patent/CN103186912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for showing a letter in a picture format and relates to the technical field of computers. The method comprises the following steps of: S1, creating a picture displaying object and transmitting the to-be-converted letter in a text editing window and a text attribute of the letter to the picture displaying object, S2, drawing the letter in the picture displaying object according to the text attribute, and S3, inserting the picture displaying object into the text editing window or a displaying window for displaying after drawing the letter. The invention further discloses a system for showing the letter in the picture format. The method and the system allow the letter to be capable of being shown in the editing window in the picture format, and improve the user experience.

Description

The method and system of showing literal with picture format
Technical field
The present invention relates to field of computer technology, particularly a kind of method and system of showing literal with picture format.
Background technology
Along with improving constantly of computer hardware performance, driven the innovation of various UI (that is: User Interface user interface) technology.Aspect user interactions UI, various pleasing UI emerge in an endless stream especially, make the user obtain improvement greatly aspect the software experience.Mutual by this close friend not only improved the quality of software, more improved user's loyalty.Well imagine that in future, UI still can be as the most important thing of software development, to the directly influence of quality generation of a software.
The content of importing in text box at present all is that the form (text formatting) with literal presents, can't realize the form of literal with picture shown in text box, make in some application scenario (as: editor of chat window, webpage) can not satisfy the demand of user's diversified display text, poor user experience.
Summary of the invention
(1) technical matters that will solve
The technical problem to be solved in the present invention is: how the text conversion with the input text frame becomes picture format to be presented in the text box.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of method of showing literal with picture format, may further comprise the steps:
S1: create picture and show object, and the text attribute of literal to be converted in the text editing window and described literal is passed to described picture demonstration object;
S2: according to described text attribute, show the described literal of drafting in the object at described picture;
S3: after literal is completed, described picture is shown that object is inserted in described text editing window or the display window show.
Wherein, also comprise between described step S1 and the S2:
Calculate and arrange the size that described picture shows object according to the size of the literal in literal number to be converted and the text attribute.
Wherein, if the literal that described literal to be converted is all inputs, the mode of calculating picture demonstration object size is: what judge input is single line text or multirow literal,
For single line text, the height that the width by single literal multiply by literal number and literal obtains width and the height that described picture shows object respectively;
For the multirow literal, the number m of delegation's literal that the statistics number of words is maximum, described picture show that the width of object is: the width * m of single literal, described picture show that the width of object is: the height * n of single literal, n are line number.
What wherein, the ordinate in the shared zone of the number of statistics new line symbol or input characters and literal height were judged input is single line text or multirow literal.
Wherein, if the literal that described literal to be converted is chosen for the user, calculating the mode that picture shows object size is: for every style of writing radical according to all literal of input with the origin coordinates of choosing literal to calculate to choose literal and stop coordinate, the picture of every row shows that the width of object is: x2-x1, highly be the literal height, x1 and x2 are respectively described origin coordinates and stop the horizontal ordinate of coordinate.
Wherein, the number of statistics new line symbol or choose the ordinate in the shared zone of literal and font height is judged input is single line text or multirow literal.
Wherein, among the described step S3, the picture of every style of writing word correspondence is shown that object is inserted in described text editing window or the display window by coordinate show simultaneously with non-switched literal.
Wherein, described text editing window or display window are windows richedit window, and described picture shows that object is the OLE control.
The present invention also provides a kind of system that shows literal with picture format, comprising:
Picture shows the Object Creation module, is used for creating picture and shows object, and a text attribute transmission described picture of literal to be converted in the text editing window and described literal is shown object;
The literal drafting module is used for according to described text attribute, shows at described picture and draws described literal in the object;
The picture character display module is used for after literal is completed, and described picture demonstration object is inserted in described text editing window or the display window show.
Wherein, described system also comprises:
Picture shows the object size computing module, is used for calculating and arrange the size that described picture shows object according to the literal size of literal number to be converted and text attribute.
(3) beneficial effect
Of the present invention to draw the literal of importing in the object (OLE control) by showing at picture in the method for picture format displaying literal, and this picture shown that object is inserted in the rich text editor, realized having improved user's experience with the picture format display text.
Description of drawings
Fig. 1 is a kind of method flow diagram of showing an embodiment of literal with picture format of the embodiment of the invention;
Fig. 2 is a kind of method flow diagram of showing another embodiment of literal with picture format of the embodiment of the invention;
Fig. 3 is the structural representation of an embodiment of the embodiment of the invention a kind of system of showing literal with picture format;
Fig. 4 is the structural representation of another embodiment of the embodiment of the invention a kind of system of showing literal with picture format.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
Embodiment 1
As shown in Figure 1, the method with picture format displaying literal of present embodiment comprises:
Step S101 creates picture and shows object, and the text attribute of the literal imported in the text editing window and literal is passed to picture shows object.In windows operating system, picture demonstration object is preferably the object connection, and (Object Linking and Embedding, OLE) control, text editing window are preferably the richedit editor among the windows with embedding.When input characters in richedit editor when (other can show character to comprise letter and number etc.), create the OLE control, and the word attribute that literal and the user of input arranges in advance passed to the OLE control, specifically the interface that provides by OLE control application programs (being the affiliated program of richedit editor) is realized.After can using VS2008 to create an ActiveX engineering, finish the establishment of an OLE engineering, as long as suitable this engineering of modification gets final product as lower interface for this OLE engineering increases.
Figure BDA0000126188070000041
Wherein, text attribute can be by the attribute configuration interface setting of application program, if do not set, then each property value all is default value.Text attribute comprises: literal size, font, text color and character background look etc.
Step S102 according to text attribute, shows the described literal of drafting in the object at picture.According to the literal of input and the picture of property value this input characters of drafting in the OLE control that previous step is created thereof.Particularly, realized that in OLE control inside interface OnDraw that a system carries realizes the drafting of literal.
Sequence number Interface Explanation
1 HRESULT OnDraw(ATL_DRAWINFO&di) Draw the OLE function
Step S103 after literal is completed, shows with picture that object is inserted in the text editing window and shows.OLE control after being about to complete among the step S102 is inserted into the richedit editor, thereby shows the literal picture of drawing.When the OLE control was inserted into the Richedit control, the Richedit control can call the Draw function of OLE automatically, finishes the drafting of OLE control in the Draw function.Simultaneously Richedit can handle the content of whole OLE control output automatically as a whole picture, thereby the user in the effect that Richedit sees is exactly: the literal that the user imports is just as a pictures, thereby reached the purpose that literal is converted into picture.
The size of the new OLE control of creating all is default value, when more or big as if the literal of input, can't show whole picture fully, therefore, referring to Fig. 2, between step S101 and step S102, also comprise step S101a: the size of calculating and arrange the OLE control according to the size of the literal in input characters number and the text attribute.
Increase an interface in the OLE control, supply arranges the size of current OLE control with program, in order to once can show all literal down, interface such as following table:
When input characters in the editor of application program, number and the line number of application program statistics input characters, the statistics new line accords with number or adds up line number n according to ordinate and the font height in the shared zone of input characters, and there is a carriage return every capable back.
If single line text, the width by single literal multiply by width nWidth and height nHeight that the height of literal number and single literal obtains the OLE control respectively.As: the size of word is: 20 * 20 pixels, the user imports 10 literal, in the absence of new line symbol: the nWidth=20 of OLE control * 10=200 pixel, height nHeight=20 pixel.
If the multirow literal, the number m of delegation's literal that the statistics number of words is maximum, the width of OLE control is: the width * m of single literal, the height of OLE control is: the height * n of single literal.As: the user imports 10 words, wherein behind the 4th word new line is arranged, and two new line symbols are arranged this moment, so, and the nWidth=20 of OLE control * 6=120 pixel, height nHeight=20 * 2=40 pixel, wherein, m, n are positive integer.
The size nWidth and the nHeight that calculate the OLE control pass to the OLE control by above-mentioned interface, by this width and the literal of highly drawing with the form that Shows Picture fully, and have realized the multirow demonstration.
The scheme of present embodiment is used for the literal of input directly is presented at editor with the form of picture more, the middle process that does not show text formatting, namely when capturing the message of input characters of keyboard, triggers editor above-mentioned steps, show that to finish picture format the window of the target window of input characters and the literal that Shows Picture is the same window usually.
Embodiment 2
In above-described embodiment 1, directly text conversion is become picture to show, in some applications, as: in microblogging or other community application, reply a certain theme, in editor, click " answer " button behind the literal of input text form, just the form of this literal with picture is presented in the text display window.Can adopt the account form of S101a among the embodiment 1 to realize that all literal that will import are with the form demonstration of picture.If the literal of wanting converting users to choose then adopts following account form to calculate:
According to all literal of input with choose literal to calculate and choose the origin coordinates of literal and to stop coordinate, the width of the OLE control of every row is: x2-x1 highly be the literal height for every style of writing radical, and x1 and x2 are respectively the horizontal ordinate of origin coordinates and termination coordinate.Equally with the number of statistics new line symbol or choose the ordinate in the shared zone of literal and the literal height is judged input is single line text or multirow literal.After converting, the OLE control of every style of writing word correspondence is inserted in the display window by coordinate shows simultaneously with non-switched literal.
Certainly the scheme of present embodiment is not limited to realize at two different windows, it also can be the demonstration that in same editor, realizes picture character, as long as reach correspondingly switch process trigger condition, this switch condition is different with different application, as: when clicking corresponding switching button or submitting information to server.
Embodiment 3
The present invention also provides a kind of system that shows literal with picture format, as shown in Figure 3, comprise: picture shows Object Creation module 1, is used for the establishment picture and shows object, and the literal of text editing window input and the text attribute of described literal are transmitted a described picture demonstration object; Literal drafting module 2 is used for according to described text attribute, shows at described picture and draws described literal in the object; Picture character display module 3 is used for after literal is completed, and described picture demonstration object is inserted in the described text editing window show.
Preferably, referring to Fig. 4, this system also comprises: picture shows object size computing module 4, is used for calculating and arrange the size that described picture shows object according to the literal size of input characters number and text attribute.This module is connected picture and shows between Object Creation module and the literal drafting module.
Method and system with picture format displaying literal of the present invention are widely used in the application program of various text editings, as instant messaging (Instant Messaging, IM) software, and the copy editor district in the webpage.
Above embodiment only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; under the situation that does not break away from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. a method of showing literal with picture format is characterized in that, may further comprise the steps:
S1: create picture and show object, and the text attribute of literal to be converted in the text editing window and described literal is passed to described picture demonstration object;
S2: according to described text attribute, show the described literal of drafting in the object at described picture;
S3: after literal is completed, described picture is shown that object is inserted in described text editing window or the display window show.
2. method of showing literal with picture format as claimed in claim 1 is characterized in that, also comprises between described step S1 and the S2:
Calculate and arrange the size that described picture shows object according to the size of the literal in literal number to be converted and the text attribute.
3. method of showing literal with picture format as claimed in claim 2 is characterized in that, if the literal that described literal to be converted is all inputs, the mode of calculating picture demonstration object size is: what judge input is single line text or multirow literal,
For single line text, the height that the width by single literal multiply by literal number and literal obtains width and the height that described picture shows object respectively;
For the multirow literal, the number m of delegation's literal that the statistics number of words is maximum, described picture show that the width of object is: the width * m of single literal, described picture show that the width of object is: the height * n of single literal, n are line number.
4. method of showing literal with picture format as claimed in claim 3 is characterized in that, what the ordinate in the zone that the number of statistics new line symbol or input characters are shared and literal height were judged input is single line text or multirow literal.
5. method of showing literal with picture format as claimed in claim 2, it is characterized in that, if the literal that described literal to be converted is chosen for the user, calculating the mode that picture shows object size is: for every style of writing radical according to all literal of input with the origin coordinates of choosing literal to calculate to choose literal and stop coordinate, the picture of every row shows that the width of object is: x2-x1, highly be the literal height, x1 and x2 are respectively described origin coordinates and stop the horizontal ordinate of coordinate.
6. method of showing literal with picture format as claimed in claim 5 is characterized in that, what the number that the statistics new line accords with or the ordinate of choosing the shared zone of literal and literal height were judged input is single line text or multirow literal.
7. method of showing literal with picture format as claimed in claim 5, it is characterized in that, among the described step S3, the picture of every style of writing word correspondence is shown that object is inserted in described text editing window or the display window by coordinate show simultaneously with non-switched literal.
8. as each described method of showing literal with picture format in the claim 1~7, it is characterized in that described text editing window or display window are windows richedit window, described picture shows that object is the OLE control.
9. a system that shows literal with picture format is characterized in that, comprising:
Picture shows the Object Creation module, is used for creating picture and shows object, and a text attribute transmission described picture of literal to be converted in the text editing window and described literal is shown object;
The literal drafting module is used for according to described text attribute, shows at described picture and draws described literal in the object;
The picture character display module is used for after literal is completed, and described picture demonstration object is inserted in described text editing window or the display window show.
10. the system that shows literal with picture format as claimed in claim 9 is characterized in that, also comprises:
Picture shows the object size computing module, is used for calculating and arrange the size that described picture shows object according to the literal size of literal number to be converted and text attribute.
CN201110448379.9A 2011-12-28 2011-12-28 The method and system of word are shown with picture format Active CN103186912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110448379.9A CN103186912B (en) 2011-12-28 2011-12-28 The method and system of word are shown with picture format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110448379.9A CN103186912B (en) 2011-12-28 2011-12-28 The method and system of word are shown with picture format

Publications (2)

Publication Number Publication Date
CN103186912A true CN103186912A (en) 2013-07-03
CN103186912B CN103186912B (en) 2016-07-06

Family

ID=48678069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110448379.9A Active CN103186912B (en) 2011-12-28 2011-12-28 The method and system of word are shown with picture format

Country Status (1)

Country Link
CN (1) CN103186912B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714291A (en) * 2013-12-30 2014-04-09 联想(北京)有限公司 Information processing method and electronic equipment
CN103744833A (en) * 2014-01-21 2014-04-23 厦门美图网科技有限公司 Path based text creating method
CN103886025A (en) * 2014-02-22 2014-06-25 小米科技有限责任公司 Method and device for displaying pictures in webpage
CN104035763A (en) * 2014-05-08 2014-09-10 小米科技有限责任公司 Character display method, device and terminal
CN104239049A (en) * 2014-09-10 2014-12-24 苏州科达科技股份有限公司 Method and system for processing photos in text edit box
CN104281626A (en) * 2013-07-12 2015-01-14 阿里巴巴集团控股有限公司 Webpage display method and webpage display device based on picture processing
CN104899184A (en) * 2014-03-04 2015-09-09 腾讯科技(深圳)有限公司 Character processing method, device and system
CN104915207A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Webpage icon making method and webpage icon making system
CN106779304A (en) * 2016-11-24 2017-05-31 广州宝钢南方贸易有限公司 A kind of inside competition for orders system and method towards steel-trading
CN106844302A (en) * 2017-03-30 2017-06-13 掌阅科技股份有限公司 E-book page display method, device and terminal device
CN107247693A (en) * 2017-06-05 2017-10-13 广东小天才科技有限公司 A kind of method and system of color adjustment
CN107643916A (en) * 2017-10-09 2018-01-30 武汉斗鱼网络科技有限公司 Control control method, device, electronic equipment and readable storage medium storing program for executing
CN111915705A (en) * 2019-05-07 2020-11-10 百度在线网络技术(北京)有限公司 Picture visual editing method, device, equipment and medium
CN114598893A (en) * 2020-11-19 2022-06-07 京东方科技集团股份有限公司 Text video implementation method and system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913499A (en) * 2005-08-09 2007-02-14 腾讯科技(深圳)有限公司 Method for implementing character multi-type in immediate message
CN101296198A (en) * 2008-06-25 2008-10-29 腾讯科技(深圳)有限公司 Method and client for inserting affluent interface constituent in instant communication window
CN101390095A (en) * 2006-03-28 2009-03-18 诺基亚公司 Method, apparatus and computer program product for generating a graphical image string to convey an intended message
CN101441713A (en) * 2007-11-19 2009-05-27 汉王科技股份有限公司 Optical character recognition method and apparatus of PDF document
CN101699426A (en) * 2009-11-06 2010-04-28 上海传知信息科技发展有限公司 Document format conversion system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913499A (en) * 2005-08-09 2007-02-14 腾讯科技(深圳)有限公司 Method for implementing character multi-type in immediate message
CN101390095A (en) * 2006-03-28 2009-03-18 诺基亚公司 Method, apparatus and computer program product for generating a graphical image string to convey an intended message
CN101441713A (en) * 2007-11-19 2009-05-27 汉王科技股份有限公司 Optical character recognition method and apparatus of PDF document
CN101296198A (en) * 2008-06-25 2008-10-29 腾讯科技(深圳)有限公司 Method and client for inserting affluent interface constituent in instant communication window
CN101699426A (en) * 2009-11-06 2010-04-28 上海传知信息科技发展有限公司 Document format conversion system and method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281626A (en) * 2013-07-12 2015-01-14 阿里巴巴集团控股有限公司 Webpage display method and webpage display device based on picture processing
CN104281626B (en) * 2013-07-12 2018-01-19 阿里巴巴集团控股有限公司 Web page display method and web page display device based on pictured processing
CN103714291A (en) * 2013-12-30 2014-04-09 联想(北京)有限公司 Information processing method and electronic equipment
CN103744833A (en) * 2014-01-21 2014-04-23 厦门美图网科技有限公司 Path based text creating method
CN103886025A (en) * 2014-02-22 2014-06-25 小米科技有限责任公司 Method and device for displaying pictures in webpage
CN103886025B (en) * 2014-02-22 2017-10-20 小米科技有限责任公司 The display methods and device of picture in webpage
CN104899184A (en) * 2014-03-04 2015-09-09 腾讯科技(深圳)有限公司 Character processing method, device and system
CN104899184B (en) * 2014-03-04 2019-10-15 腾讯科技(深圳)有限公司 Literal processing method, apparatus and system
CN104035763B (en) * 2014-05-08 2017-07-25 小米科技有限责任公司 Word methods of exhibiting, device and terminal
CN104035763A (en) * 2014-05-08 2014-09-10 小米科技有限责任公司 Character display method, device and terminal
CN104239049A (en) * 2014-09-10 2014-12-24 苏州科达科技股份有限公司 Method and system for processing photos in text edit box
CN104915207A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Webpage icon making method and webpage icon making system
CN106779304A (en) * 2016-11-24 2017-05-31 广州宝钢南方贸易有限公司 A kind of inside competition for orders system and method towards steel-trading
CN106844302A (en) * 2017-03-30 2017-06-13 掌阅科技股份有限公司 E-book page display method, device and terminal device
CN107247693A (en) * 2017-06-05 2017-10-13 广东小天才科技有限公司 A kind of method and system of color adjustment
CN107643916A (en) * 2017-10-09 2018-01-30 武汉斗鱼网络科技有限公司 Control control method, device, electronic equipment and readable storage medium storing program for executing
CN111915705A (en) * 2019-05-07 2020-11-10 百度在线网络技术(北京)有限公司 Picture visual editing method, device, equipment and medium
CN111915705B (en) * 2019-05-07 2023-07-28 百度在线网络技术(北京)有限公司 Picture visual editing method, device, equipment and medium
CN114598893A (en) * 2020-11-19 2022-06-07 京东方科技集团股份有限公司 Text video implementation method and system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN103186912B (en) 2016-07-06

Similar Documents

Publication Publication Date Title
CN103186912A (en) Method and system for showing letter in picture format
CN103853761B (en) Comment demonstration, adding method and the device of web page contents
CN101950238B (en) Method for displaying document transmission progress and system
KR20120137396A (en) Method, apparatus and client device for displaying expression information
CN103246458B (en) The method of self-defined soft keyboard and communication terminal
CN101794292A (en) Method and device for displaying related information according to instant messaging interaction content
CN104182270A (en) Display method for enabling virtual machine interfaces to adapt to mobile terminal screens with different resolution ratios
CN102752655A (en) Display method of electronic program guide
CN107102786B (en) Information processing method and client
CN102819325A (en) Input method and system for obtaining a plurality of character presenting effects
CN102043574A (en) Input method and input equipment
CN105607800A (en) Method and device for input display of terminal screen
CN103914859B (en) Input word is changed into the information processing method and device of picture
CN102298498A (en) Soft keyboard character input processing method and device
CN104572593A (en) Method, system and electronic device for processing letters
CN102314468A (en) Synchronous browse method
CN103905772A (en) Prompting method and electronic equipment
CN102591851B (en) A kind of method and apparatus for editing target text based on keyboard
CN100444087C (en) Method for displaying information on display screen based on force sense
CN102158825A (en) Handwritten multimedia message realization method
CN105869194A (en) Writing input method and device, and mobile device
CN104753759A (en) Method and device for displaying contact person information in instant messaging (IM) system
CN114063855A (en) Content input method, device, equipment and medium of instant communication software
CN103034398A (en) Method and interface assembly for processing input text in interface
CN113872849A (en) Message interaction method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100107 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building block A Room 601

Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

CP02 Change in the address of a patent holder