CN112380821B - Graphic display method and device and electronic equipment - Google Patents

Graphic display method and device and electronic equipment Download PDF

Info

Publication number
CN112380821B
CN112380821B CN202011290717.6A CN202011290717A CN112380821B CN 112380821 B CN112380821 B CN 112380821B CN 202011290717 A CN202011290717 A CN 202011290717A CN 112380821 B CN112380821 B CN 112380821B
Authority
CN
China
Prior art keywords
graphic
changed
graph
displayed
block
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
CN202011290717.6A
Other languages
Chinese (zh)
Other versions
CN112380821A (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 Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011290717.6A priority Critical patent/CN112380821B/en
Publication of CN112380821A publication Critical patent/CN112380821A/en
Application granted granted Critical
Publication of CN112380821B publication Critical patent/CN112380821B/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/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a graphic display method, a graphic display device and electronic equipment. One embodiment of the method comprises the following steps: in response to receiving a change instruction for changing a graphic in a collaborative document, obtaining a size of the changed graphic and a width of a graphic block for presenting the changed graphic, wherein the change instruction includes the size of the changed graphic; determining the proportion of the graph block to be displayed based on the size of the changed graph and the width of the graph block; determining the height of the changed graph under the proportion to be displayed, and determining the height to be displayed of the graph block based on the height of the changed graph under the proportion to be displayed; and displaying the graph blocks with the changed graphs at the to-be-displayed height in the collaborative document. When the embodiment is used for collaborative editing of the graphics in the collaborative document, the edited graphics can be displayed in the collaborative document in a reasonable size.

Description

Graphic display method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a graphic display method, a graphic display device and electronic equipment.
Background
At present, inserting and drawing graphics in a document is a very high frequency requirement, for example, users often need to express flow class information through a flow chart in the process of writing the document. In the existing online document tool, few products are provided with a graphic drawing function, and the products have not provided strong graphic drawing capability and support collaborative editing of graphics at the same time.
Disclosure of Invention
This disclosure is provided in part to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a graph display method, a graph display device and electronic equipment, and in this way, when the graph in the collaborative document is edited in a collaborative manner, the edited graph can be displayed in a reasonable size in the collaborative document.
In a first aspect, an embodiment of the present disclosure provides a graphic display method, including: in response to receiving a change instruction for changing a graphic in a collaborative document, obtaining a size of the changed graphic and a width of a graphic block for presenting the changed graphic, wherein the change instruction includes the size of the changed graphic; determining the proportion of the graph block to be displayed based on the size of the changed graph and the width of the graph block; determining the height of the changed graph under the proportion to be displayed, and determining the height to be displayed of the graph block based on the height of the changed graph under the proportion to be displayed; and displaying the graph blocks with the changed graphs at the to-be-displayed height in the collaborative document.
In a second aspect, an embodiment of the present disclosure provides a graphic display apparatus including: an obtaining unit, configured to obtain, in response to receiving a change instruction for changing a graphic in a collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic, where the change instruction includes the size of the changed graphic; a first determining unit, configured to determine a proportion of the graphic block to be displayed based on the size of the changed graphic and the width of the graphic block; the second determining unit is used for determining the height of the changed graph under the proportion to be displayed and determining the height to be displayed of the graph block based on the height of the changed graph under the proportion to be displayed; and the presentation unit is used for displaying the graph blocks with the changed graphs at the height to be displayed in the collaborative document.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the graphical display method as in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the graphical display method as in the first aspect.
The graphic display method, the graphic display device and the electronic equipment provided by the embodiment of the disclosure acquire the size of the changed graphic and the width of the graphic block for presenting the changed graphic by responding to receiving a change instruction for changing the graphic in the collaborative document; then, determining the proportion of the graph block to be displayed based on the size of the changed graph and the width of the graph block; then, determining the height of the changed graph at the proportion to be displayed, and determining the height to be displayed of the graph block based on the height of the changed graph at the proportion to be displayed; and finally, displaying the graph block with the changed graph at the to-be-displayed height in the collaborative document. In this way, when the graphics in the collaborative document are edited cooperatively, the edited graphics can be displayed in the collaborative document in a reasonable size.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is an exemplary system architecture diagram in which various embodiments of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a graphical display method according to the present disclosure;
FIG. 3 is a schematic illustration of the height to be displayed of a graphics tile according to the graphics display method of the present disclosure;
FIG. 4 is a schematic illustration of one application scenario of a graphical display method according to the present disclosure;
FIG. 5 is a flow chart of yet another embodiment of a graphical display method according to the present disclosure;
FIG. 6 is a schematic diagram of the structure of one embodiment of a graphical display device according to the present disclosure;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
FIG. 1 illustrates an exemplary system architecture 100 in which embodiments of the graphical display methods of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include editing terminals 1011, 1012, networks 1021, 1022, a server 103, and follower terminals 1041, 1042. The network 1021 is a medium for providing a communication link between the editing terminals 1011, 1012 and the server 103. The network 1022 is the medium used to provide communication links between the server 103 and the follower terminals 1041, 1042. Networks 1021, 1022 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 103 through the network 1021 using the editing terminals 1011, 1012 to send or receive messages or the like, for example, the user may send a change instruction for changing graphics in a collaborative document to the server 103 using the editing terminals 1011, 1012. The user may also interact with the server 103 via the network 1022 using the follower terminals 1041, 1042 to send or receive messages or the like, e.g. the follower terminals 1041, 1042 may receive a change instruction sent by the server 103 for changing a graphic in a collaborative document. Various communication client applications such as a document editing class application, a graphic editing class application, instant messaging software, and an enterprise collaboration platform may be installed on the editing terminals 1011, 1012 and the following terminals 1041, 1042.
The editing terminals 1011, 1012 may acquire the size of the changed graphic and the width of the graphic block for presenting the changed graphic in response to receiving a change instruction for changing the graphic in the collaborative document by the user; then, the proportion of the graph block to be displayed can be determined based on the size of the changed graph and the width of the graph block; then, the height of the changed graph at the proportion to be displayed can be determined, and the height to be displayed of the graph block is determined based on the height of the changed graph at the proportion to be displayed; finally, the graphic block in which the modified graphic is presented may be displayed at the to-be-displayed height in the collaborative document.
The follower terminals 1041, 1042 may acquire the size of the changed graphic and the width of the graphic block for presenting the changed graphic in response to receiving the change instruction for changing the graphic in the collaborative document transmitted by the edit terminal 1011, 1012 using the server 103; then, the proportion of the graph block to be displayed can be determined based on the size of the changed graph and the width of the graph block; then, the height of the changed graph at the proportion to be displayed can be determined, and the height to be displayed of the graph block is determined based on the height of the changed graph at the proportion to be displayed; finally, the graphic block in which the modified graphic is presented may be displayed at the to-be-displayed height in the collaborative document.
The editing terminals 1011, 1012 and the following terminals 1041, 1042 may be hardware or software. When the editing terminals 1011, 1012 and the following terminals 1041, 1042 are hardware, they may be various electronic devices having speakers and supporting information interaction, including but not limited to smart phones, tablet computers, laptop portable computers, etc. When the editing terminals 1011, 1012 and the following terminals 1041, 1042 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 103 may be a server providing various services. For example, the server 103 may receive a change instruction for changing the graphic in the collaborative document transmitted from the editing terminal 1011, 1012, and transmit the received change instruction for changing the graphic in the collaborative document to the follower terminal 1041, 1042 sharing the above-described shared document with the editing terminal 1011, 1012.
The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module. The present invention is not particularly limited herein.
It should be further noted that the graphic display method provided by the embodiments of the present disclosure may be performed by the editing terminals 1011, 1012, and in this case, the graphic display device may be provided in the editing terminals 1011, 1012. The graphic display method provided by the embodiments of the present disclosure may also be performed by the following terminals 1041, 1042, and at this time, the graphic display device may be disposed in the following terminals 1041, 1042.
It should be understood that the number of editing terminals, networks, servers, and follower terminals in fig. 1 is merely illustrative. There may be any number of editing terminals, networks, servers, and follower terminals, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a graphical display method according to the present disclosure is shown. The graphic display method comprises the following steps:
In response to receiving a change instruction to change the graphics in the collaborative document, step 201, a size of the changed graphics and a width of a graphics tile for rendering the changed graphics are obtained.
In this embodiment, the execution subject of the graphic display method (e.g., the editing terminal or the following terminal shown in fig. 1) may detect whether a change instruction to change the graphic in the collaborative document is received. The change instruction may include a size of the changed graphic. The change instruction may include a change type, such as adding a part of an element in a graphic, deleting a part of an element in a graphic, and modifying a part of an element in a graphic.
In this embodiment, the collaborative document may be referred to as a shared document or an online document, and generally refers to a document tool used online in a browser (instead of a local computer), which is characterized in that the content written in the document is automatically stored in real time, and supports collaborative editing by multiple persons, that is, multiple persons are supported to edit the same document at the same time. The graphics described above may include, but are not limited to: flow charts and UML (UML-Unified Model Language, unified modeling language) diagrams.
Here, a built-in "graphic editor" may be present in the collaborative document, and a user may insert and edit graphics into the collaborative document as needed using the "graphic editor", and after editing, the graphics may be present in the document in the form of SVG (Scalable Vector Graphics ) pictures, which is convenient for a reader of the document to read the graphics.
The user can insert the graph and edit the graph in the graph editor in the collaborative document, the edited graph can be displayed in the collaborative document, and the user can enlarge and view the edited graph. The graphics in the "graphics editor" are typically co-editable graphics, i.e., the editing process that supports multiple people to co-edit the graphics and can render the graphics in real time.
By way of example, graphEditor may be employed as the graphics editor described above, with the OT-JSON being utilized to effect collaborative editing of graphics on the basis of GraphEditor. OT-JSON is a collaborative algorithm, and can automatically solve the conflict mechanism when editing the flow chart by multiple persons.
If a change instruction for changing the graphics in the collaborative document is received, the execution body may acquire the size of the changed graphics and the width of the graphics block for presenting the changed graphics. The dimensions of the modified graphic may include the width and height of the graphic, generally referred to as the maximum width and maximum height of the graphic. The width of the graphic Block (Block) for presenting the changed graphic is usually defaulted to the width of the document editor in the collaborative document, and the user can manually adjust the width of the document editor.
Step 202, determining the proportion of the graphic block to be displayed based on the size of the changed graphic and the width of the graphic block.
In this embodiment, the execution body may determine the proportion of the graphics block to be displayed based on the size of the changed graphics and the width of the graphics block. The display scale is typically used to resize a document window in the document editing class software.
Step 203, determining the height of the changed graphic under the to-be-displayed proportion, and determining the to-be-displayed height of the graphic block based on the height of the changed graphic under the to-be-displayed proportion.
In this embodiment, the execution body may determine a product of the height of the changed graphic and the to-be-displayed ratio as the height of the changed graphic at the to-be-displayed ratio.
As an example, if the to-be-displayed ratio of the graphic block is 50%, and the height of the modified graphic is 20 cm, the height of the modified graphic at the to-be-displayed ratio is 10 cm (product of 20 cm and 0.5). Then, the execution subject may determine the height to be displayed of the graphics block based on the height of the changed graphics at the ratio to be displayed. Here, the execution body may determine a height to be displayed of the graphic block as a height of the modified graphic at the ratio to be displayed. As an example, if the height of the modified graphic at the to-be-displayed scale is 10 cm, the to-be-displayed height of the graphic block may be determined to be 10 cm.
Step 204, displaying the graph block with the changed graph at the to-be-displayed height in the collaborative document.
In this embodiment, the execution body may display the graphic block in which the modified graphic is displayed at the height to be displayed determined in step 203 in the collaborative document.
When the graphics in the collaborative document are edited in a collaborative manner, the method provided by the embodiment of the disclosure can enable the edited graphics to be displayed in a reasonable size in the collaborative document.
In some optional implementations, the execution body may be an editing terminal, where the editing terminal may detect whether the user edits the graphics in the collaborative document, and if it is detected that the user edits the graphics in the collaborative document, the size of the changed graphics and the width of the graphics block for presenting the changed graphics may be obtained.
In some optional implementations, the executing body may be a follower terminal, where the follower terminal may determine whether a change instruction sent by the editing terminal to change the graphic in the collaborative document is received. The user may change the graphics in the collaborative document using the editing terminal, and then may send a change instruction to a follower terminal sharing the collaborative document with the editing terminal using a server. If the following terminal receives a change instruction for changing the graphics in the collaborative document sent by the editing terminal, the size of the changed graphics and the width of a graphics block for presenting the changed graphics can be obtained.
In some optional implementations, the executing entity may determine the height to be displayed of the graphics block based on the height of the modified graphics at the ratio to be displayed by: the execution body may determine the sum of the height of the changed graphic at the to-be-displayed ratio and the target height as the to-be-displayed height of the graphic block. The target height may be a sum of a height of an inner margin (padding) disposed above the modified pattern and a height of an inner margin disposed below the modified pattern. The padding attributes define the space between the element's bounding box and the element's content.
As shown in fig. 3, fig. 3 shows a schematic view of the height to be displayed of the graphic block according to the graphic display method of the present embodiment. In fig. 3, the height to be displayed of the graphic block is composed of the height at the ratio to be displayed of the modified graphic, the height of the inner margin provided above the modified graphic, and the height of the inner margin provided below the modified graphic.
With continued reference to fig. 4, fig. 4 is a schematic diagram of an application scenario of the graphic display method according to the present embodiment. In the application scenario of fig. 4, the editing terminal 401 detects that the user edits the graphics in the collaborative document, and may send the modification instruction 404 to the following terminal 403 sharing the collaborative document with the editing terminal 401 using the server 402. Here, the modified graphic size is included in the modification instruction 404. The follower terminal 403 then obtains the dimensions 405 of the modified graphic as 8 cm wide and 10 cm high, and the width 406 of the graphic block as 10 cm. Then, the follower terminal 403 may determine a proportion 407 to be displayed of the graphic block based on the size 405 of the changed graphic and the width 406 of the graphic block. Here, the follower terminal 403 determines that the to-be-displayed ratio 407 of the above-described graphic block is 100%. The follower terminal 403 may determine the product of the height 10 cm of the modified graphic and the 100% of the to-be-displayed ratio as the height 408 of the modified graphic at the to-be-displayed ratio. Then, the height 409 to be displayed of the graphic block may be determined as the height 408 of the modified graphic at the ratio to be displayed, that is, the height 409 to be displayed of the graphic block is 10 cm. Finally, the follower terminal 403 may display a graphic block in which the above-described modified graphic is displayed at a height to be displayed of 10 cm in the above-described collaborative document.
With further reference to fig. 5, a flow 500 of yet another embodiment of a graphical display method is shown. The flow 500 of the graphical display method includes the steps of:
In step 501, in response to receiving a change instruction for changing a graphic in a collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic are obtained.
In this embodiment, step 501 may be performed in a similar manner to step 201, and will not be described herein. Step 502 determines whether the width of the modified graphic is greater than the width of the graphic block.
In this embodiment, the execution subject of the graphic display method (e.g., the editing terminal or the following terminal shown in fig. 1) may determine whether the width of the changed graphic is greater than the width of the graphic block. The width of the graphical block generally defaults to the width of the document editor in the collaborative document.
If it is determined that the width of the modified graphic is greater than the width of the graphic block, the execution body may execute step 503.
If it is determined that the width of the modified graphic is less than or equal to the width of the graphic block, the execution body may execute step 505.
In step 503, if the width of the changed pattern is greater than the width of the pattern block, the size of the changed pattern is reduced in an equal proportion, so that the width of the changed pattern is equal to the width of the pattern block.
In this embodiment, if it is determined in step 502 that the width of the modified pattern is greater than the width of the pattern block, the execution body may perform an equal-scale reduction on the size of the modified pattern, that is, perform an equal-scale reduction on the width and the height of the modified pattern, so that the width of the modified pattern is equal to the width of the pattern block.
For example, if the width of the modified pattern is 15 cm and the width of the pattern block is 12 cm, the width of the modified pattern is larger than the width of the pattern block, and at this time, the width and the height of the modified pattern may be reduced in an equal proportion, so that the width of the modified pattern is reduced from 15 cm to 12 cm.
Step 504, determining the proportion of the graphic block to be displayed according to the reduced value of the size of the changed graphic.
In this embodiment, the execution body may determine the proportion of the graphics block to be displayed according to the reduced value of the size of the modified graphics. Specifically, the execution body may determine a product of a target display ratio and a reduced value of the size of the changed graphic as a ratio to be displayed of the graphic block. Here, the target display scale is generally 100%. As an example, if the width of the modified pattern is reduced from 15 cm to 12 cm, the reduction value is 0.8 (ratio of 12 to 15). At this time, 80% of the product of the target display ratio 100% and the reduction value 0.8 may be determined as the ratio to be displayed of the above-described graphic block.
In step 505, if the width of the changed graphic is less than or equal to the width of the graphic block, the to-be-displayed ratio of the graphic block is set as the target display ratio.
In this embodiment, if it is determined in step 502 that the width of the modified graphic is less than or equal to the width of the graphic block, the execution body may set the to-be-displayed ratio of the graphic block as the target display ratio. Here, the target display scale is generally 100%. I.e. the proportion of the graphic block to be displayed is set to 100%.
Step 506, determining the height of the changed graphic under the to-be-displayed proportion, and determining the to-be-displayed height of the graphic block based on the height of the changed graphic under the to-be-displayed proportion.
Step 507, displaying the graph block with the changed graph at the to-be-displayed height in the collaborative document.
In this embodiment, steps 506-507 may be performed in a similar manner to steps 203-204, and will not be described again.
As can be seen from fig. 5, compared with the embodiment corresponding to fig. 2, the flow 500 of the graphic display method in this embodiment represents a specific step of determining the scale to be displayed of the graphic block. Therefore, the scheme described in this embodiment may reduce the to-be-displayed proportion of the graphic block to a scaling value when the width of the changed graphic is equal to the width of the graphic block when the width of the changed graphic is greater than the width of the graphic block, and set the to-be-displayed proportion of the graphic block to 100% when the width of the changed graphic is less than or equal to the width of the graphic block. The method can enable the proportion of the determined graph blocks to be displayed to be more reasonable, and further enable the edited graph to be displayed in a more reasonable size in the collaborative document.
With further reference to fig. 6, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a graphics display apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the graphic display device 600 of the present embodiment includes: an acquisition unit 601, a first determination unit 602, a second determination unit 603, and a presentation unit 604. The obtaining unit 601 is configured to obtain, in response to receiving a change instruction for changing a graphic in the collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic, where the change instruction includes the size of the changed graphic; the first determining unit 602 is configured to determine a proportion of the graphics block to be displayed based on the size of the changed graphics and the width of the graphics block; the second determining unit 603 is configured to determine a height of the changed graphic at the to-be-displayed ratio, and determine a to-be-displayed height of the graphic block based on the height of the changed graphic at the to-be-displayed ratio; the presentation unit 604 is configured to display a graphic block in which the changed graphic is displayed at a height to be displayed in the collaborative document.
In the present embodiment, specific processes of the acquisition unit 601, the first determination unit 602, the second determination unit 603, and the presentation unit 604 of the graphic display device 600 may refer to step 201, step 202, step 203, and step 204 in the corresponding embodiment of fig. 2.
In some alternative implementations, the first determining unit 602 may be further configured to determine the to-be-displayed ratio of the graphics tile based on the size of the modified graphics and the width of the graphics tile by: the first determining unit 602 may first determine whether the width of the modified graphic is greater than the width of the graphic block; if so, the size of the changed graph can be reduced in an equal proportion, so that the width of the changed graph is equal to the width of the graph block; finally, the first determining unit 602 may determine the proportion of the graphics block to be displayed according to the reduced size of the modified graphics.
In some alternative implementations, the first determining unit 602 may be further configured to determine the to-be-displayed ratio of the graphics tile based on the size of the modified graphics and the width of the graphics tile by: the first determining unit 602 may determine whether the width of the modified graphic is greater than the width of the graphic block; if not, the first determining unit 602 may set the to-be-displayed ratio of the graphic block to a target display ratio. In some optional implementations, the second determining unit 603 may be further configured to determine the height to be displayed of the graphics block based on the height of the modified graphics at the ratio to be displayed by: the second determining unit 603 may determine a sum of a height of the changed graphic at the to-be-displayed ratio and a target height as a to-be-displayed height of the graphic block, wherein the target height may be a sum of a height of an inner margin disposed above the changed graphic and a height of an inner margin disposed below the changed graphic.
In some alternative implementations, the obtaining unit 601 may be further configured to obtain, in response to receiving a change instruction for changing a graphic in the collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic by: in response to detecting an edit instruction by the user to edit the graphics in the collaborative document, the above-described acquisition unit 601 may acquire the size of the changed graphics and the width of the graphics block for presenting the changed graphics.
In some alternative implementations, the obtaining unit 601 may be further configured to obtain, in response to receiving a change instruction for changing a graphic in the collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic by: in response to receiving a modification instruction for modifying a graphic in a collaborative document sent by an editing terminal, the above-described obtaining unit 601 may obtain a size of the modified graphic and a width of a graphic block for presenting the modified graphic.
Referring now to fig. 7, a schematic diagram of a configuration of an electronic device (e.g., editing terminal or follower terminal in fig. 1) 700 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 7 is only one example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 7, the electronic device 700 may include a processing means (e.g., a central processor, a graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage means 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 700 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 7 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 709, or installed from storage 708, or installed from ROM 702. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 701. It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving a change instruction for changing a graphic in a collaborative document, obtaining a size of the changed graphic and a width of a graphic block for presenting the changed graphic, wherein the change instruction includes the size of the changed graphic; determining the proportion of the graph block to be displayed based on the size of the changed graph and the width of the graph block; determining the height of the changed graph under the proportion to be displayed, and determining the height to be displayed of the graph block based on the height of the changed graph under the proportion to be displayed; and displaying the graph blocks with the changed graphs at the to-be-displayed height in the collaborative document.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, a first determination unit, a second determination unit, and a presentation unit. Wherein the names of these units do not constitute a limitation of the unit itself in some cases, for example, the presentation unit may also be described as "a unit displaying a graphic block of the changed graphic at a height to be displayed in the collaborative document".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (10)

1. A graphical display method, comprising:
In response to receiving a change instruction for changing a graph in a collaborative document, acquiring the size of the changed graph and the width of a graph block for presenting the changed graph, wherein the change instruction comprises the size of the changed graph;
Determining a proportion to be displayed of the graphic block based on the size of the changed graphic and the width of the graphic block;
determining the height of the changed graph under the to-be-displayed proportion, and determining the to-be-displayed height of the graph block based on the height of the changed graph under the to-be-displayed proportion;
Displaying the graphic block presenting the altered graphic at the height to be displayed in the collaborative document; and
The determining the proportion to be displayed of the graphic block based on the size of the changed graphic and the width of the graphic block includes:
Determining whether the width of the modified graphic is greater than the width of the graphic block;
If not, setting the proportion to be displayed of the graphic block as a target display proportion;
If yes, the size of the changed graph is reduced in an equal proportion, so that the width of the changed graph is equal to the width of the graph block;
And determining the proportion to be displayed of the graph block according to the reduced value of the size of the changed graph.
2. The method of claim 1, wherein the determining the height to be displayed of the graphics tile based on the height of the modified graphic at the ratio to be displayed comprises:
and determining the sum of the height of the changed graph under the to-be-displayed proportion and a target height as the to-be-displayed height of the graph block, wherein the target height is the sum of the height of the inner margin arranged above the changed graph and the height of the inner margin arranged below the changed graph.
3. The method according to claim 1 or 2, wherein in response to receiving a change instruction for changing a graphic in a collaborative document, obtaining a size of the changed graphic and a width of a graphic tile for presenting the changed graphic comprises:
and responding to the detection of an editing instruction for editing the graph in the collaborative document by a user, and acquiring the size of the graph after modification and the width of a graph block for presenting the graph after modification.
4. The method according to claim 1 or 2, wherein in response to receiving a change instruction for changing a graphic in a collaborative document, obtaining a size of the changed graphic and a width of a graphic tile for presenting the changed graphic comprises:
and responding to a change instruction which is sent by the editing terminal and used for changing the graphics in the collaborative document, and acquiring the size of the changed graphics and the width of a graphics block used for presenting the changed graphics.
5. A graphic display device, comprising:
An obtaining unit, configured to obtain, in response to receiving a change instruction for changing a graphic in a collaborative document, a size of the changed graphic and a width of a graphic block for presenting the changed graphic, where the change instruction includes the size of the changed graphic;
A first determining unit configured to determine a proportion to be displayed of the graphic block based on the size of the changed graphic and the width of the graphic block;
a second determining unit, configured to determine a height of the changed graphic at the to-be-displayed ratio, and determine a to-be-displayed height of the graphic block based on the height of the changed graphic at the to-be-displayed ratio;
A presentation unit configured to display the graphic block in which the modified graphic is presented at the height to be displayed in the collaborative document; and
The first determining unit is further configured to determine a proportion to be displayed of the graphic block based on the size of the changed graphic and the width of the graphic block by:
Determining whether the width of the modified graphic is greater than the width of the graphic block;
If not, setting the proportion to be displayed of the graphic block as a target display proportion;
If yes, the size of the changed graph is reduced in an equal proportion, so that the width of the changed graph is equal to the width of the graph block;
And determining the proportion to be displayed of the graph block according to the reduced value of the size of the changed graph.
6. The apparatus according to claim 5, wherein the second determining unit is further configured to determine the height to be displayed of the graphic block based on the height of the changed graphic at the ratio to be displayed by:
and determining the sum of the height of the changed graph under the to-be-displayed proportion and a target height as the to-be-displayed height of the graph block, wherein the target height is the sum of the height of the inner margin arranged above the changed graph and the height of the inner margin arranged below the changed graph.
7. The apparatus according to claim 5 or 6, wherein the obtaining unit is further configured to obtain the size of the changed graphic and the width of the graphic block for presenting the changed graphic in response to receiving a change instruction to change the graphic in the collaborative document by:
and responding to the detection of an editing instruction for editing the graph in the collaborative document by a user, and acquiring the size of the graph after modification and the width of a graph block for presenting the graph after modification.
8. The apparatus according to claim 5 or 6, wherein the obtaining unit is further configured to obtain the size of the changed graphic and the width of the graphic block for presenting the changed graphic in response to receiving a change instruction to change the graphic in the collaborative document by:
and responding to a change instruction which is sent by the editing terminal and used for changing the graphics in the collaborative document, and acquiring the size of the changed graphics and the width of a graphics block used for presenting the changed graphics.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-4.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-4.
CN202011290717.6A 2020-11-17 2020-11-17 Graphic display method and device and electronic equipment Active CN112380821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011290717.6A CN112380821B (en) 2020-11-17 2020-11-17 Graphic display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011290717.6A CN112380821B (en) 2020-11-17 2020-11-17 Graphic display method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112380821A CN112380821A (en) 2021-02-19
CN112380821B true CN112380821B (en) 2024-05-28

Family

ID=74584111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011290717.6A Active CN112380821B (en) 2020-11-17 2020-11-17 Graphic display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112380821B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013088199A1 (en) * 2011-12-12 2013-06-20 Aselsan Elektronik Sanayi Ve Ticaret Anonim Sirketi System and method for estimating target size
WO2017063324A1 (en) * 2015-10-16 2017-04-20 青岛海信移动通信技术股份有限公司 Window displaying method and mobile terminal
KR101801710B1 (en) * 2017-06-09 2017-12-20 주식회사 디앤디랩 Editing method and apparatus for printing file of outputting high-resolution image.
KR101880507B1 (en) * 2017-04-21 2018-07-20 주식회사 한글과컴퓨터 Client terminal device that supports resizing of a figure embedded in a web document and operating method thereof
CN109032476A (en) * 2018-08-07 2018-12-18 长沙拓扑陆川新材料科技有限公司 A method of showing large data sets in graphical user interfaces
CN109710866A (en) * 2018-12-18 2019-05-03 天津字节跳动科技有限公司 Image display method and device in online document
CN110188299A (en) * 2019-05-27 2019-08-30 北京字节跳动网络技术有限公司 Response type page processing method, device and electronic equipment
CN110968811A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Display control method and device
CN111209721A (en) * 2018-11-16 2020-05-29 北京京东尚科信息技术有限公司 Bitmap font realization method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160140250A1 (en) * 2014-11-13 2016-05-19 Microsoft Technology Licensing, Llc. Dynamic adjustment of elements of a document
US20170003829A1 (en) * 2015-06-30 2017-01-05 Microsoft Technology Licensing, Llc Graphical user interface facilitating sharing and collaborative editing of electronic documents
US20170161871A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and electronic device for previewing picture on intelligent terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013088199A1 (en) * 2011-12-12 2013-06-20 Aselsan Elektronik Sanayi Ve Ticaret Anonim Sirketi System and method for estimating target size
WO2017063324A1 (en) * 2015-10-16 2017-04-20 青岛海信移动通信技术股份有限公司 Window displaying method and mobile terminal
KR101880507B1 (en) * 2017-04-21 2018-07-20 주식회사 한글과컴퓨터 Client terminal device that supports resizing of a figure embedded in a web document and operating method thereof
KR101801710B1 (en) * 2017-06-09 2017-12-20 주식회사 디앤디랩 Editing method and apparatus for printing file of outputting high-resolution image.
CN109032476A (en) * 2018-08-07 2018-12-18 长沙拓扑陆川新材料科技有限公司 A method of showing large data sets in graphical user interfaces
CN110968811A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Display control method and device
CN111209721A (en) * 2018-11-16 2020-05-29 北京京东尚科信息技术有限公司 Bitmap font realization method and device, electronic equipment and storage medium
CN109710866A (en) * 2018-12-18 2019-05-03 天津字节跳动科技有限公司 Image display method and device in online document
CN110188299A (en) * 2019-05-27 2019-08-30 北京字节跳动网络技术有限公司 Response type page processing method, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于科技文档的AutoCAD插图精准出图方法;景天虎;图学学报;第37卷(第01期);125-129 *

Also Published As

Publication number Publication date
CN112380821A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN111399956A (en) Content display method and device applied to display equipment and electronic equipment
CN112035030B (en) Information display method and device and electronic equipment
CN111459364B (en) Icon updating method and device and electronic equipment
WO2023040443A1 (en) Method and device for drawing canvas
CN114363686B (en) Method, device, equipment and medium for publishing multimedia content
CN114528816B (en) Collaborative editing information display method and device, electronic equipment and readable medium
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN111259636A (en) Document rendering method and device and electronic equipment
CN112380819B (en) Document editing method and device and electronic equipment
CN113313623A (en) Watermark information display method, watermark information display device, electronic equipment and computer readable medium
CN112445394B (en) Screenshot method and screenshot device
CN112307393A (en) Information issuing method and device and electronic equipment
CN112380821B (en) Graphic display method and device and electronic equipment
CN110874446A (en) Page display method and system, computer system and computer readable medium
CN111708597B (en) Information processing method and device and electronic equipment
CN113835790B (en) Paging page display method and device based on Android
CN114742013A (en) Online document display method and device and electronic equipment
CN113568695A (en) Corner mark processing method and device for boarder application
CN113672317A (en) Method and device for rendering title page
CN112965778B (en) Chat page display method, chat page display device, electronic equipment and computer readable medium
CN111857879B (en) Data processing method, device, electronic equipment and computer readable medium
CN113220293B (en) Page display method, page display device, electronic equipment and computer readable medium
CN114912420B (en) Document processing method, device, electronic equipment and storage medium
CN112306339B (en) Method and apparatus for displaying image

Legal Events

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