CN107391148B - View element saving method and device, electronic equipment and computer storage medium - Google Patents

View element saving method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN107391148B
CN107391148B CN201710629552.2A CN201710629552A CN107391148B CN 107391148 B CN107391148 B CN 107391148B CN 201710629552 A CN201710629552 A CN 201710629552A CN 107391148 B CN107391148 B CN 107391148B
Authority
CN
China
Prior art keywords
view
rectangle
saving
minimum rectangle
view element
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
CN201710629552.2A
Other languages
Chinese (zh)
Other versions
CN107391148A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710629552.2A priority Critical patent/CN107391148B/en
Publication of CN107391148A publication Critical patent/CN107391148A/en
Application granted granted Critical
Publication of CN107391148B publication Critical patent/CN107391148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a view element saving method, a view element saving device, electronic equipment and a computer storage medium, wherein the view element saving method comprises the following steps: determining a minimum rectangle containing all view elements in a view page; and saving the view element according to the minimum rectangle. By the method and the device for storing the view elements, the electronic equipment and the computer storage medium, all the view elements in the view page can be normally displayed, meanwhile, a blank area generated when the view elements are not written after the view page roams is avoided, and the stored content can be optimally displayed.

Description

View element saving method and device, electronic equipment and computer storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for saving a view element, an electronic device, and a computer storage medium.
Background
With the development of multimedia technology, intelligent display devices have entered into people's daily life, such as electronic whiteboards, electronic drawing and painting software, which are often used in teaching, meeting, personal or family events, and the like.
After the user writes in the display device, the user expects to store the written content, so that the written content is convenient to record and share. For example, a method for saving writing contents in an electronic whiteboard is generally to capture a screenshot of the writing contents in the whiteboard and save the screenshot in a picture mode. In practical applications, in order to obtain a larger writing area in the whiteboard, a roaming mode is usually added, wherein the roaming mode is a mode for moving or zooming the whiteboard content through a mouse or touch gesture. When a larger writing area is obtained through roaming, a user can write in a new area and add new elements, and at the moment, the proportion and the size of the actual occupied space of the whiteboard are changed. At present, there are two main ways of screenshot on whiteboard content: firstly, regardless of the offset and the zoom amount of the current roaming, the screen capture is always performed by the content of the whiteboard region in the screen display range, so that the content outside the screen cannot be displayed in the screen capture, and the content is lost; second, the actual occupation size of the whiteboard is taken as the screen capture size. Under the condition, when the whiteboard is not written after roaming, and elements are not added, the actual occupied size of the whiteboard still becomes large, so that a large amount of blank areas appear on the screenshot page.
Disclosure of Invention
The application provides a view element saving method and device, electronic equipment and a computer storage medium. To solve the problem that the view elements in the saved file are lost or a large amount of blank areas are generated.
According to a first aspect of embodiments of the present application, there is provided a view element saving method, including: determining a minimum rectangle containing all view elements in a view page; and saving the view element according to the minimum rectangle.
Further, said saving said view element according to said smallest rectangle comprises: adjusting the minimum rectangle to obtain an adjusted rectangle; and saving the view element according to the adjusting rectangle.
Further, the adjusting the minimum rectangle to obtain an adjusted rectangle includes: and adding blank margins with preset compensation values around the minimum rectangle to obtain the adjusting rectangle.
Further, the adjusting the minimum rectangle to obtain an adjusted rectangle includes: if the length of the minimum rectangle is smaller than the preset length, adding a blank margin of a length compensation value in the length direction of the minimum rectangle; if the width of the minimum rectangle is smaller than the preset width, adding a blank margin of a width compensation value in the width direction of the minimum rectangle; wherein the length compensation value is equal to the difference between the preset length and the length of the minimum rectangle, the width compensation value is equal to the difference between the preset width and the width of the minimum rectangle, and the view element is located at the center position of the adjustment rectangle.
Further, the adjusting the minimum rectangle to obtain an adjusted rectangle includes: and determining the aspect ratio of the minimum rectangle, and adjusting the aspect ratio to a preset aspect ratio to obtain the adjusted rectangle.
Further, said saving said view element according to said smallest rectangle comprises: constructing a rectangular object; populating the view element into the rectangular object according to the minimum rectangle size; saving the view element in the rectangular object.
Said populating said view element into said rectangular object according to said minimum rectangle size, comprising: constructing a view drawing brush; assigning a value to the view brush according to the minimum rectangle size and the view element; and filling the assigned view brush into the rectangular object.
Further, the saving the view element in the rectangular object includes: constructing a bitmap object; drawing the view elements in the rectangular object into the bitmap object; and saving the bitmap object.
Further, the populating the view element into the rectangular object includes: acquiring a parent container containing the view element; populating the view elements in the parent container into the rectangular object.
According to a second aspect of embodiments of the present application, there is provided a view element saving apparatus including: the determining module is used for determining the minimum rectangle containing all the view elements in the view page; and the saving module is used for saving the view elements according to the minimum rectangle.
According to a third aspect of embodiments herein, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described view element saving method.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium storing computer-executable instructions for performing the above-described view element saving method.
According to the view element saving method, the view element saving device, the electronic equipment and the computer storage medium, all view elements are contained in the minimum rectangle, so that all view elements in the view page can be normally displayed in the file content saved according to the minimum rectangle, and meanwhile, a large amount of blank areas generated when the view elements are not written after the view page roams are avoided, and the saved content can be optimally displayed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
Fig. 1 is a flowchart illustrating a view element saving method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a view page without roaming according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a view page roaming according to an embodiment of the present application;
FIG. 4 is a diagram illustrating another view page roaming according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a saved file in which view elements are saved according to a minimum rectangle according to an embodiment of the present application;
FIG. 6 is a flowchart of one embodiment of the step of saving view elements according to a minimum rectangle in the embodiment shown in FIG. 1;
FIG. 7 is a flow chart illustrating another method for saving view elements according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating an embodiment of the present application for adding blank margins to the periphery of a minimum rectangle;
fig. 9 is a block diagram illustrating a structure of a view element saving apparatus according to an embodiment of the present application;
fig. 10 is a block diagram illustrating a structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart of a view element saving method provided in an exemplary embodiment of the present application, which is applicable to saving written content in a display device, where the view element includes one or more of a text, a graphic, and a table in the written content. Such as: the method comprises the steps of saving the writing content in the electronic whiteboard software, saving the writing content in the drawing software and the like. The file of saved view elements may be in a picture format. The view element saving method of the embodiment of the application includes steps 11 to 12. Wherein the content of the first and second substances,
in step 11, the smallest rectangle in the view page containing all view elements is determined.
In step 12, the view element is saved according to the smallest rectangle.
The following description will be given taking an electronic whiteboard as an example.
As shown in fig. 2, 3, and 4, the view page 21 in the embodiment of the present application may be a writing picture for writing the view element 22 within the display window 24 of the electronic whiteboard. In practical applications, the user may move or zoom the view page 21 through a mouse, a keyboard or a touch gesture, so that the view page 21 is roamed to obtain a larger writing range and add more view elements 22. When the view page 21 is roamed and the view elements 22 are added to the roaming area, the display window 24 can only display a part of the view elements 22, and all the view elements 22 in the view page 21 can be displayed by dragging a mouse, a keyboard shortcut or by touching a gesture to move or zoom the view page 21. Fig. 2 shows a schematic diagram of the view page 21 when it is not roaming, and fig. 3 and 4 show schematic diagrams of the view page 21 when it is roaming.
Referring to fig. 2, the minimum rectangle 23 in the embodiment of the present application is a rectangle of the smallest size capable of containing all the view elements 22 in the view page 21. The coordinate values of each view element 22 may be determined first and then the minimum rectangle 23 may be determined from the coordinate values of each view element 22.
After the minimum rectangle 23 is determined, the view element 22 may be saved according to the minimum rectangle 23. Saving the file is shown in fig. 5. In this way the size of the saved file is the same as the size of the smallest rectangle 23, and the view elements 22 are placed close to the edges of the pages of the file, which allows a smaller capacity footprint to be achieved. As shown in fig. 5, the file saved according to the minimum rectangle 23 contains all the view elements and no blank area due to roaming.
In an alternative embodiment, step 12 may include substep 121, substep 122, and substep 123. As shown in fig. 6, wherein:
in sub-step 121, a rectangular object is constructed.
In sub-step 122, the view element is filled into the rectangular object according to the minimum rectangle size.
In an alternative embodiment, a view brush (visual brush) may be constructed using WPF (Windows Presentation Foundation Windows-based user interface framework) technology and assigned a value according to the smallest rectangle size and view element; and drawing by using the UI element by using the view brush, wherein the drawing area of the view brush is the minimum rectangle, and then filling the assigned view brush into the rectangular object.
In another alternative embodiment, the view elements in the parent container may be obtained by reflection techniques in the C # language and then the value assigned to the view brush according to the view elements in the parent container. The assigned view brush is then populated into the rectangular object. In order to ensure that the view elements can be drawn in the original proportion, the view brush can be assigned with values according to the view elements in the parent container in a self-adaptive mode. The assigned view brush is then populated into the rectangular object.
In sub-step 123, the view elements in the rectangular object are saved.
In an alternative embodiment, a bitmap object (RenderTargetBitmap) may be constructed first, and the view elements in the rectangular object are drawn into the bitmap object, which is then saved. The size of the bitmap thus saved is the size of the smallest rectangle. In another alternative embodiment, the values may be assigned to the pixel widths and heights of the view element bitmap object. For example, the pixel width and height of the bitmap object are assigned according to the resolution of the bitmap desired to be saved, and the resolution of the saved bitmap is the desired resolution. In yet another embodiment, when saving the bitmap object, the bitmap object may be saved according to a specified format, save path.
In another alternative embodiment, a rectangular frame object may be further constructed, the content of the rectangular frame object is a rectangular object, and the background of the rectangular frame object is the background of the view page. The rectangular box object may then be assigned an output size, which is the size of the bitmap that the user desires to output, and the view elements in the rectangular object may then be saved according to the output size.
In the embodiment of the present application, since the minimum rectangle 23 includes all the view elements 22, it can be ensured that all the view elements 22 in the view page can be displayed normally according to the file content stored in the minimum rectangle 23. Meanwhile, a large blank area generated when the view element 22 is not written after the view page is roamed is avoided, so that the content of the saved file can be optimally displayed.
Fig. 7 is a flowchart of another view element saving method provided in an exemplary embodiment of the present application, where the view element saving method in the embodiment of the present application includes steps 71 to 73. Wherein the content of the first and second substances,
in step 71, the smallest rectangle in the view page that contains all the view elements is determined.
In step 72, the minimum rectangle is adjusted to obtain an adjusted rectangle.
In step 73, the view element is saved according to the adjustment rectangle.
In this embodiment, after determining the minimum rectangle 23 containing all the view elements 22, the minimum rectangle 23 may be adjusted to obtain an adjusted rectangle 25, as shown in fig. 8. The view element 22 is then saved according to the adjustment rectangle 25, so that the saved file size is the same as the size of the adjustment rectangle 25.
In an alternative embodiment, referring to fig. 8, blank margins of a preset compensation value may be added around the minimum rectangle 23 to obtain the adjustment rectangle 25. The preset compensation value can be set in a software program, such as 20 pixel units. The minimum rectangle 23 and the adjustment rectangle 25 are spaced 20 pixel units apart. The file stored according to the adjustment rectangle 25 has a white border of 20 pixel units around the view element 22, which is more suitable for the user's review habit. However, in practical applications, the preset compensation value may be other preset values, for example, it may be determined according to the size of the minimum rectangle 23, for example, when the size of the minimum rectangle 23 is larger, the preset compensation value may be increased appropriately, so that the file saved according to the adjustment rectangle 25 has a wider white edge, and the pages of the saved file look more harmonious.
In another optional embodiment, if the length of the minimum rectangle 23 is less than the preset length, a blank margin of the length compensation value is added in the length direction of the minimum rectangle 23; wherein the length compensation value is equal to the difference between the preset length and the length of the minimum rectangle 23. In an alternative embodiment, the length of the display window 24 may be set to a preset length, that is: when the length of the minimum rectangle 23 is smaller than the length of the display window 24, a blank margin is added to the minimum rectangle 23 according to the difference between the lengths of the minimum rectangle 23 and the display window 24, so that the length of the minimum rectangle 23 is equal to the length (i.e., the preset length) of the display window 24. Specifically, a blank margin having a size of one half of the length compensation value may be added to each of the left and right sides of the minimum rectangle 23. This may allow the view element 22 to be located entirely in the center of the adjustment rectangle 25. Similarly, if the width of the minimum rectangle 23 is smaller than the preset width, a blank margin of a width compensation value is added in the width direction of the minimum rectangle 23, wherein the width compensation value is equal to the difference between the preset width and the width of the minimum rectangle 23. Similarly, the width of the display window 24 may also be set to be a preset width, and the method of adding the margin of the width compensation value in the width direction of the minimum rectangle 23 is similar to the method of adding the margin of the length compensation value in the length direction of the minimum rectangle 23, and is not described herein again.
In another alternative embodiment, a fixed value may also be set for the preset length and the preset width, for example, the preset length is 1280 pixel units, and the preset width is 720 pixel units. However, the specific values of the preset length and the preset width are not limited in the embodiment of the present application. The present embodiment can adjust the size of the minimum rectangle 23 when the view page 21 is not roamed, so that the size of the adjustment rectangle 25 is equal to a preset standard size (such as the size of the display window 24), and thus the file saved according to the adjustment rectangle 25 has a better size.
In another alternative embodiment, if the length of the minimum rectangle 23 is less than a predetermined length (e.g., the length of the display window 24), and the width of the minimum rectangle 23 is greater than or equal to the predetermined width. Blank margins for the length compensation values may be added in the length direction of the minimum rectangle 23 without processing in the width direction of the minimum rectangle 23. Namely: the resulting adjustment rectangle 25 has a length equal to the preset length and the adjustment rectangle 25 has a width equal to the width of the smallest rectangle 23. Alternatively, a blank margin of the length compensation value may be added in the length direction of the minimum rectangle 23, and a blank margin of a preset compensation value (e.g., 20 pixel units) may be added in the width direction of the minimum rectangle 23. Namely: the resulting adjustment rectangle 25 has a length equal to the preset length and the width of the adjustment rectangle 25 is equal to the width of the minimum rectangle 23 plus 20 pixel units.
In another alternative embodiment, if the width of the minimum rectangle 23 is smaller than the predetermined width (e.g. the width of the display window 24), and the length of the minimum rectangle 23 is greater than or equal to the predetermined length. A margin of the width compensation value is added in the width direction of the minimum rectangle 23 and no processing is performed in the length direction of the minimum rectangle 23. Namely: the resulting width of the adjustment rectangle 25 is equal to the preset width and the length of the adjustment rectangle 25 is equal to the length of the minimum rectangle 23. Alternatively, the blank margin of the width compensation value may be added in the width direction of the minimum rectangle 23, and the blank margin of the preset compensation value (e.g., 20 pixel units) may be added in the length direction of the minimum rectangle 23. Namely: the resulting width of the adjustment rectangle 25 is equal to the preset width and the length of the adjustment rectangle 25 is equal to the length of the minimum rectangle 23 plus 20 pixel units.
In another alternative embodiment, when the minimum rectangle 23 is adjusted, the aspect ratio of the minimum rectangle 23 may be determined first, and then the aspect ratio is adjusted to the preset aspect ratio to obtain the adjusted rectangle 25. In the present embodiment, the preset aspect ratio may be an aspect ratio of the display window 24. The aspect ratio of the rectangle 25 can be adjusted to be equal to the preset aspect ratio (e.g., the aspect ratio of the display window 24) by adding blank margins of the same size on both the left and right sides or both the top and bottom sides of the minimum rectangle 23. In practical applications, the predetermined aspect ratio may also be other values, such as 16:9, 4:3, etc. Therefore, the saved files can have a better length-width ratio, and the saved files can be optimally displayed.
In an embodiment of the present application, the user may select the type of saving of the view element 22 on the page of the electronic whiteboard software of the smart device. The smart device may adjust the minimum rectangle 23 according to the received user selected save type. Such as: the user can write the view element 22 in the view page 21 of the electronic whiteboard, and after writing, the written content can be saved by clicking a save button in the display interface, and when the smart device receives a save request from the user, a save type option can be provided, such as: optimal display effect, optimal display scale, minimum capacity occupation, equal width display, equal length display and the like. The user can select the corresponding type according to the requirement, and after the intelligent device receives the request of the storage type of the user, the minimum rectangle 23 is adjusted according to the corresponding strategy, and the minimum rectangle is stored according to the adjustment rectangle 25. For example, when a storage request for the best display effect is received, blank margins of a preset offset value are added around the minimum rectangle 23, and then the view element 22 is stored; when a save request of the optimal display scale is received, adjusting the aspect ratio of the minimum rectangle 23 to a preset aspect ratio, and then saving the view element 22; when a save request for minimum capacity occupation is received, no adjustment is made to the minimum rectangle 23, the view elements 22 are saved directly according to the minimum rectangle 23, and so on.
Corresponding to the embodiment of the view element saving method, the application also provides an embodiment of a view element saving device. Please refer to fig. 9.
The view element saving apparatus includes: a determination module 91 and a saving module 92. Wherein the content of the first and second substances,
the determining module 91 is configured to determine a minimum rectangle in the view page that contains all the view elements; the saving module 92 is used for saving the view element according to the minimum rectangle determined by the determining module 91.
In an optional embodiment, the saving module 92 is configured to adjust the minimum rectangle determined by the determining module 91 to obtain an adjusted rectangle; and saving the view elements according to the adjustment rectangle. In this embodiment of the application, the saving module 92 may adjust the minimum rectangle according to a preset policy to obtain an adjusted rectangle. Such as: in one embodiment, the saving module 92 may add blank margins of the preset compensation value around the minimum rectangle; the preset compensation value can be set in a software program, such as 20 pixels. In another embodiment, if the length of the minimum rectangle is less than the preset length, adding a blank margin of a length compensation value in the length direction of the minimum rectangle so that the length of the adjustment rectangle is equal to the preset length, and if the width of the minimum rectangle is less than the preset width, adding a blank margin of a width compensation value in the width direction of the minimum rectangle so that the width of the adjustment rectangle is equal to the preset width; in another embodiment, the aspect ratio of the smallest rectangle may be determined first, and then adjusted to the preset aspect ratio to obtain the adjusted rectangle.
In another alternative embodiment, the saving module 92 is further configured to construct a rectangular object, fill the view element into the rectangular object, assign a value to the rectangular object according to the minimum rectangular size, and then save the view element according to the assignment result.
The functions of the determining module 91 and the saving module 92 in the embodiment of the present application may be implemented by a processor, and the processor is configured with program instructions, and the program instructions are saved in a memory, and when the program instructions are executed, the view element saving method of the above embodiment can be implemented.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The present application also provides an electronic device, as shown in fig. 10, including: at least one processor 101 and a memory 102 communicatively coupled to the at least one processor 101 are illustrated in fig. 10 as one processor 101.
The electronic device may further include: an input device 103 and an output device 104.
The processor 101, the memory 102, the input device 103, and the output device 104 may be connected by a bus or other means, and the bus connection is exemplified in fig. 10.
The memory 102, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the view element saving method in the embodiment of the present invention (e.g., the determining module 91 and the saving module 92 shown in fig. 9). The processor 101 executes various functional applications of the server and data processing by executing the non-transitory software programs, instructions, and modules stored in the memory 102, that is, implements the view element saving method in the above method embodiment.
The memory 102 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the processing apparatus operated by the list items, and the like. Further, the memory 102 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 102 may optionally include a memory remotely located from the processor 101, and these remote memories may be connected to the processor for the view element saving method through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 103 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the processing device operated by the list items. The output device 104 may include a display device such as a display screen.
In this embodiment, when one or more modules (e.g., the determining module 91 and the saving module 92 shown in fig. 9) stored in the memory 102 are executed by the one or more processors 101, the processor 101 performs the view element saving method in any of the above-described method embodiments.
The electronic device of embodiments of the present invention exists in a variety of forms, including but not limited to:
(1) mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID and UMPC devices, such as smart tablets
The present application further provides a computer storage medium storing computer-executable instructions for performing the method for saving a view element in any of the above method embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (11)

1. A view element saving method, comprising:
determining a minimum rectangle containing all view elements in a view page after the actual occupied space of the view page is increased;
adding a blank margin to the minimum rectangle to obtain an adjusted rectangle;
and saving the view element according to the adjusting rectangle.
2. The method of claim 1, wherein the adding a blank margin to the minimum rectangle to obtain an adjusted rectangle comprises:
and adding blank margins with preset compensation values around the minimum rectangle to obtain the adjusting rectangle.
3. The method of claim 1, wherein the adding a blank margin to the minimum rectangle to obtain an adjusted rectangle comprises:
if the length of the minimum rectangle is smaller than the preset length, adding a blank margin of a length compensation value in the length direction of the minimum rectangle; and
if the width of the minimum rectangle is smaller than the preset width, adding a blank margin of a width compensation value in the width direction of the minimum rectangle;
wherein the length compensation value is equal to the difference between the preset length and the length of the minimum rectangle, the width compensation value is equal to the difference between the preset width and the width of the minimum rectangle, and the view element is located at the center position of the adjustment rectangle.
4. The method of claim 1, wherein the adding a blank margin to the minimum rectangle to obtain an adjusted rectangle comprises:
and determining the aspect ratio of the minimum rectangle, and adjusting the aspect ratio to a preset aspect ratio by adding blank margins to obtain the adjusted rectangle.
5. The method of claim 1, wherein saving the view element according to the adjustment rectangle comprises:
constructing a rectangular object;
filling the view elements into the rectangular object according to the resized rectangle;
saving the view element in the rectangular object.
6. The method of claim 5, wherein the populating the view element into the rectangular object according to the resizing rectangle comprises:
constructing a view drawing brush;
assigning a value to the view brush according to the adjusted rectangle size and the view element;
and filling the assigned view brush into the rectangular object.
7. The method of claim 5, wherein the populating the view element into the rectangular object comprises:
acquiring a parent container containing the view element;
populating the view elements in the parent container into the rectangular object.
8. The method of claim 5, wherein the saving the view element in the rectangular object comprises:
constructing a bitmap object;
drawing the view elements in the rectangular object into the bitmap object;
and saving the bitmap object.
9. A view element saving apparatus, comprising:
the determining module is used for determining the minimum rectangle containing all the view elements in the view page after the actual occupied space of the view page is enlarged;
the storage module is used for adding blank margins to the minimum rectangle to obtain an adjusted rectangle; and saving the view element according to the adjusting rectangle.
10. An electronic device, comprising: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the view element saving method of any one of claims 1 to 8.
11. A computer storage medium having stored thereon computer-executable instructions for performing the view element saving method of any one of claims 1 to 8.
CN201710629552.2A 2017-07-28 2017-07-28 View element saving method and device, electronic equipment and computer storage medium Active CN107391148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710629552.2A CN107391148B (en) 2017-07-28 2017-07-28 View element saving method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710629552.2A CN107391148B (en) 2017-07-28 2017-07-28 View element saving method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN107391148A CN107391148A (en) 2017-11-24
CN107391148B true CN107391148B (en) 2020-09-15

Family

ID=60341551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710629552.2A Active CN107391148B (en) 2017-07-28 2017-07-28 View element saving method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN107391148B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762628B (en) * 2018-04-23 2020-10-02 广州视源电子科技股份有限公司 Page element mobile display method and device, terminal equipment and storage medium
CN109062471B (en) * 2018-07-10 2020-11-10 广州视源电子科技股份有限公司 Mobile display method, device, equipment and medium for page elements
CN114419193B (en) * 2022-01-24 2023-03-10 北京思明启创科技有限公司 Image drawing method, image drawing device, electronic equipment and computer-readable storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ITPI20070093A1 (en) * 2007-08-08 2009-02-09 Mario Pirchio METHOD TO ANIMATE ON THE SCREEN OF A COMPUTER A PENNAVIRTUAL WRITING AND DRAWING
US8831350B2 (en) * 2011-08-29 2014-09-09 Dst Technologies, Inc. Generation of document fingerprints for identification of electronic document types
CN102685363B (en) * 2012-05-29 2014-06-25 山东神思电子技术股份有限公司 Picture storing method for copying equipment
CN104077309B (en) * 2013-03-28 2018-05-08 日电(中国)有限公司 A kind of method and apparatus that dimension-reduction treatment is carried out to time series
CN104731390A (en) * 2013-12-18 2015-06-24 深圳富泰宏精密工业有限公司 System and method for saving original handwriting
CN105988747B (en) * 2015-02-16 2018-11-16 株式会社理光 Method of printing and printing equipment
CN105843515A (en) * 2016-05-31 2016-08-10 宇龙计算机通信科技(深圳)有限公司 Method and device for inputting information
CN106201172B (en) * 2016-06-24 2020-09-01 广州视睿电子科技有限公司 Canvas display method and device for touch screen terminal

Also Published As

Publication number Publication date
CN107391148A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
US11500513B2 (en) Method for icon display, terminal, and storage medium
US10747416B2 (en) User terminal device and method for displaying thereof
CN109032722B (en) Method, device, equipment and medium for updating display effect of UI component
US8769403B2 (en) Selection-based resizing for advanced scrolling of display items
CN110377285B (en) Method and device for generating page skeleton screen and computer equipment
AU2019457052B2 (en) Table processing method and apparatus, and intelligent interactive tablet and storage medium
EP2874054B1 (en) Application text adjusting method, device, and terminal
US20150088669A1 (en) Apparatus and method for providing responsive user interface and electronic device-readable recording medium therefor
CN107391148B (en) View element saving method and device, electronic equipment and computer storage medium
CN110928614B (en) Interface display method, device, equipment and storage medium
US20170091152A1 (en) Generating grid layouts with mutable columns
WO2015184736A1 (en) Method and terminal for transforming background picture of touchscreen device
CN109040767B (en) Live broadcast room loading method, system, server and storage medium
CN110750664A (en) Picture display method and device
CN105824517A (en) Implementation method and apparatus of desktop
CN107861711B (en) Page adaptation method and device
CN114579912A (en) Page layout method, device, equipment and medium
CN110647369B (en) Page dynamic display method and device, mobile terminal and storage medium
CN112783595A (en) Display method and device for interactive writing and electronic equipment
CN111428455B (en) Form management method, device, equipment and storage medium
US20210073458A1 (en) Comic data display system, method, and program
CN115390976A (en) Layout method of interface design, display method of interface and related equipment
CN113254131A (en) Page background display method and device
CN113763552A (en) Three-dimensional geographic model display method and device, computer equipment and storage medium
CN111722823A (en) Method and device for self-adapting screen resolution, storage medium and electronic equipment

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