Icon display method and system, medium and program product

Through the dual-path switching display method based on the classification of vector element objects and bitmap technology, the artifacts and efficiency problems of icon display during DPI changes are solved, and an efficient and clear icon display effect is achieved to adapt to the needs of diversified interfaces.

CN120406788AActive Publication Date: 2025-08-01SUZHOU CAD SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510533909.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-01
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

Traditional icon display methods are prone to artifacts when the system DPI is enlarged and reduced, and the display efficiency of vector graphics-based display schemes decreases under diversified interfaces, and high computing resource consumption.

Method used

The preliminary classification and program markup language generation method based on vector element objects are adopted, combined with the dual-path switching display of bitmap technology, and the icon display efficiency and clarity are optimized by multi-thread drawing and staged color drawing on the canvas.

Benefits of technology

It improves the clarity and display efficiency of icons during the zooming process, saves computer resources, and adapts to different resolutions and diversified interface needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406788A_ABST
    Figure CN120406788A_ABST
Patent Text Reader

Abstract

The invention relates to the field of control icon display, in particular to an icon display method and system, a medium and a program product. The method comprises the following steps: S101, acquiring icon content of at least one icon; s102, generating a first drawing element according to the icon content by adopting a first drawing method, wherein the first drawing element comprises a program markup language and a first label; the program markup language adopts vector information to describe icon contents; s103, receiving a first calling signal sent by the user, wherein the first calling signal comprises the icon information of the icon to be identified; and S104, drawing the icon content on the first canvas according to the first drawing element by adopting a first display method so as to display the icon on the current display interface. According to the method, the vector diagram technology is introduced to solve the problem that icons of desktop large-scale application programs are not clearly displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of control icon display, and particularly to an icon display method, system, medium and program product. Background Art

[0002] Traditional industrial software graphical interface control icons have the following problems: when the system DPI (Dots Per Inch) is enlarged or reduced, the icons may appear artifacts, that is, blurred. Based on this problem, some software adopts the method of drawing different sizes of pictures under different DPIs to adapt to different DPIs of the system. However, such a coping method requires extremely high computing resources.

[0003] Currently, the prior art has also tried to adopt the form of vector graphics to meet the resolution requirements of different display screens.

[0004] For another example, patent application CN107301046A discloses an icon processing method and device, a computer device and a storage medium, which based on the identifier of a vector graphic image, obtain the corresponding vector graphic image, and the vector graphic image aggregates vector graphics of at least two icons; obtain a display instruction for an icon in the vector graphic image; and display the corresponding icon according to the display instruction.

[0005] For example, patent application CN106843639A discloses an icon display method and an icon display device, which include: pre-storing a basic file of an icon, where each icon corresponds to a basic file; obtaining an attribute value of the icon; generating a scalable vector graphics (SVG) file according to the basic file and the obtained attribute value; and when displaying the icon, drawing the icon according to the SVG file.

[0006] For another example, patent application CN112817667A discloses a terminal and a control icon display method. The terminal includes: a display unit for displaying a user interface; a processor for determining vector graphic information corresponding to a control icon of an application; drawing a vector graphic corresponding to the control icon according to the vector graphic information, and rendering the vector graphic with the color of the theme used by the application to obtain a control icon; and displaying the control icon in the user interface of the application.

[0007] However, the applicant has noticed that with the diversification of the icon application interface, such as the increase in the number and types of icons displayed on the interface, the traditional vector graphic display solution will face the problem of decreased display efficiency during application. Summary of the Invention

[0008] The purpose of the present invention is to provide an icon display method, which partially solves or alleviates the above deficiencies in the prior art and can improve the clarity of icons during zooming.

[0009] To solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions: In a first aspect of the present invention, there is provided an icon display method, including the steps of: S101, obtaining the icon content of at least one icon; S102, generating a first drawing element according to the icon content by using a first drawing method, the first drawing element including: a program markup language, a first label; Among them, S102 includes: S1021, generating at least one corresponding vector graphic according to the icon content of at least one; S1022, respectively identifying the vector graphics as at least one vector element object; wherein, the vector element object is a basic geometric unit in the vector graphic, and the vector element object is described by a first drawing language, and the first drawing language is used to define the color, shape, size, outline, and position of the basic geometric unit; S1023, generating a corresponding program markup language according to the first drawing language, and the program markup language or the vector element object is associated with a first label, and the first label records icon information; S103, receiving a first call signal sent by a user, the first call signal including: icon information of an icon to be recognized; S104, using a first display method to draw the icon content on a first canvas according to the first drawing element, so as to display the icon on the current display interface.

[0010] In some embodiments, it further includes: S10221, determining whether there are at least two vector element objects with the same first drawing language among the multiple vector element objects; if so, identifying the vector element object as a duplicate object; S10222, retaining one vector element object as a drawing element object from the duplicate objects, and recording the icon information of the duplicate objects in the corresponding first label; S10223, generating a corresponding program markup language for the drawing element object.

[0011] In some embodiments, it further includes the steps of: S105, generating a second drawing element according to the icon content by using a second drawing method, the second drawing element including: a pixel point information set, a second label; wherein, the pixel point information set includes: a plurality of pixel points, and each pixel point records a position and a color value, and the second label records icon information; S106. Use the second display method to draw the icon content on the second canvas according to the second drawing element, so as to display the icon on the current display interface.

[0012] In some embodiments, when there are at least two icons to be displayed, S104 includes the steps of: S1041. Identify a plurality of vector element objects corresponding to the at least two icon information; S1042. Divide the vector element objects into repeated objects and non-repeated objects. Among them, when the first drawing languages of the drawing element object and the remaining drawing element objects are all different, the drawing element object is identified as a non-repeated object; S1043. Create at least one first drawing area on the first canvas, and draw the repeated objects on the first drawing area according to the program markup language; S1044. Create at least one second drawing area on the first canvas, and draw the non-repeated objects on the second drawing area according to the program markup language; S1045. When displaying one of the icons, find the repeated objects and non-repeated objects associated with the icon according to the first label; S1046. Combine the repeated objects and the non-repeated objects to display the icon.

[0013] In some embodiments, when the icon to be recognized has at least two colors, S104 includes the steps of: (1) Identify the colors of the multiple vector element objects; (2) Group the vector element objects according to the colors to obtain a plurality of vector drawing groups, and the vector element objects in one vector drawing group have the same color; (3) Select a drawing pen according to the color to be drawn; (4) Use the drawing pen to draw one of the vector drawing groups on the first canvas; (5) When the current vector drawing group finishes drawing, judge whether there is a remaining color to be drawn; (6) If so, generate a pen switching signal, if not, end the drawing; (7) In response to the pen switching signal, switch to a new drawing pen according to the remaining color to be drawn, and return to (4).

[0014] In some embodiments, before S104 or S106, it further includes the steps of: S107. Identify the color vividness of the icon; S108. Determine whether the degree of color vividness is greater than a set first degree threshold. If so, execute S106; if not, execute S104.

[0015] In some embodiments, before S104 or S106, the following step is further included: Identify the number of vector element objects of the icon; Determine whether the number is greater than a set first quantity threshold. If so, execute S106; if not, execute S104.

[0016] Advantageous technical effects: In order to improve the display efficiency of icons, optimize the display clarity of icons, and ensure the user operation experience in the scaling scenario, the present invention provides a scheme for icon display based on vector technology.

[0017] Furthermore, the present invention performs preliminary classification based on vector element objects to generate a limited number of program markup languages, thereby saving the computer resources occupied by vector technology.

[0018] Furthermore, the present invention also provides a dual-path switching display method based on vector technology and bitmap technology to coordinate and balance the display requirements and the computing resources required for display.

[0019] Furthermore, for the display scenario of a large number of icons, the present invention also provides a multi-threaded drawing method on the canvas.

[0020] Furthermore, especially for icons with a large degree of color richness, the present invention can perform phased drawing on the canvas according to color categories. This phased drawing implemented based on color can improve the drawing efficiency to a certain extent and reduce the resource consumption caused by frequent switching of the drawing pen. Description of the drawings

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts do not necessarily draw according to the actual scale. Obviously, the following described drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0022] Figure 1a It is a schematic flowchart of an icon display method in an exemplary embodiment of the present invention; Figure 1b It is a schematic flowchart of an icon drawing process in an exemplary embodiment of the present invention; Figure 2 Schematic diagram of the display of a test icon in an exemplary embodiment of the present invention; Figure 3 Schematic diagram of the module structure of an icon display system in an exemplary embodiment of the present invention. Detailed implementation manners

[0023] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] In this document, suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of explaining the present invention and have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.

[0025] In this document, terms such as "upper", "lower", "inner", "outer", "front", "rear", "one end", "the other end", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0026] In this document, unless otherwise clearly defined and limited, terms such as "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0027] In this document, "and / or" includes any and all combinations of one or more of the listed related items.

[0028] In this document, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.

[0029] As used in this specification, the term "about" typically means + / - 5% of the value, more typically + / - 4% of the value, more typically + / - 3% of the value, more typically + / - 2% of the value, even more typically + / - 1% of the value, and even more typically + / - 0.5% of the value.

[0030] In this specification, certain embodiments may be disclosed in a format that is within a certain range. It should be understood that this description of "within a certain range" is merely for convenience and brevity and should not be construed as a rigid limitation on the disclosed range. Therefore, the description of the range should be considered to have specifically disclosed all possible sub-ranges and the individual numerical values within that range. For example, the description of the range 1 to 6 should be regarded as having specifically disclosed sub-ranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., as well as the individual numbers within that range, such as 1, 2, 3, 4, 5, and 6. The above rules apply regardless of the breadth of the range.

[0031] "Vector element object": refers to the elements that specifically constitute a vector graphic object (or called: vector diagram), such as points, lines, rectangles, polygons, circles, and arcs, etc. These elements can be obtained by mathematical formula calculations and have the characteristic of no distortion after editing. The vector element object can be defined by attributes such as color, shape, contour, size, and position. In other words, the vector element object can be completely drawn according to these attributes.

[0032] "Vector graphic object": One or more vector elements form a vector graphic object, that is, a vector diagram. A vector diagram, also known as an object-oriented image or drawing image, is mathematically defined as a series of lines connected by points. In this article, a vector graphic object can correspond to an icon.

[0033] With the expansion of the CAD application environment, such as it can be opened and used on the computer side, mobile phone side, tablet side, or web side according to the user's needs. However, the display resolutions and hardware performances in different application environments vary greatly. In this regard, the applicant has noticed that although the conventional vector diagram technology can, to a certain extent, solve the problem of icon scaling, that is, adapting to display screens with different resolutions.

[0034] However, for large-scale applications on desktop systems, especially taking CAD (Computer Aided Design) as an example, in order to display a large number of operation functions, a large number of different icons (also known as: "control icons") need to be displayed under different operation interfaces. Especially during the gradual update of CAD software, multiple operation states can be provided to users. Once the operation state is switched, it will also involve the redrawing and display of a large number of icons, which will occupy a certain amount of computing resources. Moreover, during the operation of CAD by users, conventional drawing operations already involve relatively large resource consumption. Therefore, traditional vector graphics and bitmaps are both difficult to solve multiple problems such as computing resources and display clarity during application. Embodiment 1 In order to improve the display efficiency of icons and at the same time optimize the display clarity of icons to ensure the operation experience of users in the scaling scenario, refer to Figure 1a As shown, the present invention also provides an icon display method, including the steps: S101, obtain the icon content of at least one icon; In some embodiments, the icon content refers to the pattern information to be displayed in the icon, which can be obtained in advance by software engineers according to the icon design scheme.

[0035] S102, generate a first drawing element according to the icon content by using a first drawing method, where the first drawing element includes: a program markup language, a first label; Among them, S102 includes: S1021, generate at least one corresponding vector graphic according to at least one of the icon contents; Among them, the vector graphic refers to the geometric information in the icon. For example, refer to Figure 2 As shown, Figure 2 shows the icon content, and a vector graphic (i.e., a line segment) can be obtained through the icon content in Figure 2 .

[0036] For example, the icon content can be the design data of the icon, which records or describes the pattern information to be displayed in the icon. The vector information of the icon can be interpreted according to the icon content, that is, the overall pattern in the icon is described by a mathematical relationship.

[0037] S1022, respectively identify the vector graphic as at least one vector element object; where the vector element object is the basic geometric unit in the vector graphic, and the vector element object is described by using a first drawing language.

[0038] Among them, the first drawing language is used to define the color, shape, size, outline, and position of the basic geometric unit (such as the relative display position of the basic geometric unit in the icon). In some embodiments, when there are two or more geometric figures in a vector graphic, the two or more geometric figures can be respectively recognized as independent vector element objects (i.e., basic geometric units).

[0039] In some embodiments, the basic geometric unit may refer to the smallest unit that a vector graphic can be disassembled into. For example, it can be a point, a line, a triangle, a rectangle, a polygon, etc. For example, a geometric figure formed by connecting a line can be recognized as a basic geometric unit.

[0040] In some embodiments, the shape, outline, and position of the basic geometric unit can be defined by a mathematical relationship (such as a function). Therefore, the vector graphic can be drawn according to different application scenarios (such as different display resolutions). For example, the first drawing language includes: a function for defining the geometric element information of the basic geometric unit.

[0041] Preferably, in some embodiments, after disassembling the vector graphic based on geometric elements, the geometric figure can also be disassembled according to the color attribute. For example, preferably, only one color is included in the basic geometric unit.

[0042] In some embodiments, the color can be a grayscale value or a brightness value. Or, in some embodiments, the color can be described using three primary colors: red (Red), green (Green), and blue (Blue).

[0043] It can be understood that color, shape, size, outline, and position are attribute information used to describe the basic geometric unit. Of course, the user can select different combinations of attribute information according to different display requirements (such as the type of the object to be displayed), as long as the display of the icon can be completed.

[0044] S1023, generate a corresponding program markup language according to the first drawing language, and a first label is associated with the program markup language or the vector element object, and the first label records icon information; Preferably, this program markup language refers to the XAML (Extensible Application Markup Language) language.

[0045] S103, receive a first call signal sent by the user, and the first call signal includes: icon information of the icon to be recognized; For example, in some embodiments, the first call signal may be an activation signal for the user to open the first operation interface. Correspondingly, the first call signal may further include: icon information of all the icons to be displayed under the first operation interface. The icon information may be information such as the name (ID), number, etc. of the icon for positioning the identity of the icon.

[0046] In some embodiments, in response to the first call signal, step S104 may be further executed to draw the icon content on the first canvas according to the first drawing element by using the first display method, so as to display the icon on the current display interface.

[0047] Preferably, WPF (Windows Presentation Foundation, which is a Windows-based user interface framework) may be selected to draw and display the icon, and the icon may be converted into a drawing language recognizable in WPF through the preprocessing process of S102.

[0048] In some embodiments, when multiple vector element objects are recognized in S1022, correspondingly, S1023 includes the steps of: S10221, determining whether there are at least two vector element objects with the same first drawing language among the multiple vector element objects; if so, identifying the vector element object as a duplicate object; S10222, retaining one vector element object as a drawing element object from the duplicate objects, and recording the icon information of the duplicate objects in the corresponding first label; S10223, generating the corresponding program markup language for the drawing element object.

[0049] For example, in some embodiments, when multiple vector element objects are disassembled from multiple vector graphics respectively, it may be determined whether there are two identical vector element objects. For example, when there is a triangle in both the first and second icons, and the attribute information such as the color, shape, size, outline, position, etc. of the triangle are all equal, the triangle may be identified as a duplicate object. For two duplicate objects, only one segment of program markup language is generated, and the first label is associated with the program markup language. The first label jointly records the icon information of the first and second icons. Therefore, in the subsequent drawing and display process, the first and second icons may share resources for this segment of program markup language, that is, synchronously call it.

[0050] In some embodiments, the method further includes the steps of: S105. Generate a second drawing element according to the icon content using a second drawing method. The second drawing element includes: a pixel point information set and a second label. Among them, the pixel point information set includes a plurality of pixel points, and each pixel point records a position and a color value. The second label records icon information. S106. Draw the icon content on a second canvas according to the second drawing element using a second display method, so as to display the icon on the current display interface.

[0051] Preferably, the second display method in this embodiment is a bitmap display method, and the corresponding picture of the icon is a bitmap image. Among them, the bitmap display method refers to a method of representing an image through a pixel array. A bitmap image, also known as a dot matrix image or a raster image, is composed of individual points called pixels (picture elements). These pixel points can be arranged and colored differently to form patterns. For the display scenario of a large number of icons, the present invention also provides a multi-threaded drawing method on a canvas.

[0052] For example, in some embodiments, see Figure 1b As shown, when there are at least two icons to be displayed, S104 includes the steps of: S1041. Identify a corresponding plurality of vector element objects according to the at least two pieces of icon information. For example, the icon to be displayed can be confirmed according to the icon information, and all the vector element objects to be drawn can be confirmed according to the icon to be displayed.

[0053] S1042. Divide the vector element objects into repeated objects and non-repeated objects. Among them, when the first drawing languages of the vector element object and the other vector element objects are all different, the vector element object is identified as a non-repeated object. For example, when the geometric attributes (such as color, shape, size, contour, position) of two vector element objects are exactly the same, the two vector element objects are considered to be repeated objects. If a vector element object is different from all other vector element objects in geometric attributes, it can be considered that the vector element is a non-repeated object. That is to say, vector element objects can be defined into two categories: repeated objects and non-repeated objects.

[0054] S1043. Create at least one first drawing area on the first canvas, and draw the repeated objects on the first drawing area according to the program markup language (corresponding first drawing content can be obtained). S1044. Create at least one second drawing area on the first canvas, and draw the non-repeated objects on the second drawing area according to the program markup language (corresponding second drawing content can be obtained). S1045, when displaying one of the icons, find the duplicate objects and non-duplicate objects associated with the icon according to the first label; S1046, combine the duplicate objects and the non-duplicate objects to display the icon.

[0055] For example, the first labels associated with the duplicate objects and non-duplicate objects record icon information. Taking the first icon with duplicate objects as an example, retrieve at least one duplicate object corresponding to the first icon (such as obtaining the first drawing content), and retrieve at least one non-duplicate object corresponding to the second icon (such as obtaining the second drawing content), and integrate the first drawing content and the second drawing content, then the first icon can be completely displayed.

[0056] In some embodiments, when the icon to be recognized has at least two colors, S104 includes the steps of: (1) Identify the colors of multiple vector element objects; (2) Group the vector element objects according to the colors to obtain multiple vector drawing groups, and the vector element objects in one vector drawing group have the same color; (3) Select a drawing pen according to the color to be drawn; (4) Use the drawing pen to draw one of the vector drawing groups on the first canvas; (5) After the current vector drawing group is drawn, determine whether there is a remaining color to be drawn; (6) If so, generate a pen switching signal, if not, end the drawing; (7) In response to the pen switching signal, switch to a new drawing pen according to the remaining color to be drawn, and return to (4) until all colors are drawn.

[0057] Preferably, in this embodiment, the vector element objects can be initially disassembled based on colors, and phased drawing can be performed on the canvas according to colors. This phased drawing implemented based on colors can improve the drawing efficiency to a certain extent. Especially for icons with a large color richness, it can reduce the resource consumption caused by frequent pen switching.

[0058] Further, in some embodiments, the method may further include the steps of: Identify the number of color categories of multiple vector element objects; When the number of categories is greater than the first category threshold, preferably use the above-mentioned color-based segmented drawing method, otherwise, the multiple vector element objects can be drawn sequentially in a conventional order (such as from left to right, from top to bottom).

[0059] In some embodiments, before S104 or S106, the method further includes the steps of: S107, identifying the vividness degree of the icon; S108, determining whether the vividness degree is greater than a set first degree threshold. If so, execute S106; if not, execute S104.

[0060] For example, in some embodiments, the vividness degree of the color may refer to the category of the color.

[0061] Again, for example, in some embodiments, the vividness degree of the color may be the color depth. In the field of computer graphics, the color depth represents the number of bits used to store the color of 1 pixel in a bitmap, and it is also called bits per pixel (bpp). The higher the color depth, the more available colors there are.

[0062] In this embodiment, a method for switching the display logic based on the color richness is comprehensively provided. For example, in some scenarios, when the operation interface has a high requirement for the display standard of color richness, bitmap resources can be used for processing. On the contrary, the SVG file provided by the present invention can be preferably used for processing to comprehensively optimize the icon display effect and efficiency in combination with the actual application scenario.

[0063] In some embodiments, before S104 or S106, the method further includes the steps of: identifying the number of vector element objects of the icon; determining whether the number is greater than a set first number threshold. If so, execute S106; if not, execute S104.

[0064] Preferably, in some embodiments, the icon display mechanism can be switched by comprehensively considering the vividness degree of the color and the number of vector element objects.

[0065] For example, in some embodiments, when the vividness degree of the color is greater than a set first degree threshold and the number is greater than a set first number threshold, the corresponding icon is drawn and displayed using the bitmap display method.

[0066] In this embodiment, for the simultaneous display requirement of a large number of icons, the bitmap display method and the vector graph display method can be used for synchronous display.

[0067] In some embodiments, in order to meet the resolution requirements in multiple scenarios, the pixel point set of an icon may include 1920x1080 pixel points. When the icon is applied to scenarios with other resolutions, its data needs to be adjusted. For example, when applied to a scenario with a higher resolution, pixel points need to be expanded, which may cause image distortion. In addition, when applied to a scenario with a lower resolution, pixel points need to be omitted, which may easily lead to missing image data, discontinuous image lines, poor display effects, and affect the user experience.

[0068] Preferably, in order to give full play to the color advantages of the bitmap and balance computing resources, before using the bitmap display method for display, the present invention further includes the steps of: Calculating the difference between the preset resolution of the icon and the current resolution of the current display interface; Calculating the predicted distortion degree of the icon according to the difference; When the predicted distortion degree is less than the first set value, the bitmap display method is allowed to be selected for display.

[0069] For example, in some embodiments, when the resolution drops from 1920x1080 to 1280x720, |1920x1080 - 1280x720| pixel points will be lost, and the number of lost pixel points can also be referred to as the difference between the two resolutions. The predicted distortion degree is the ratio between the difference and the original preset resolution, that is, |1920x1080 - 1280x720| / 1920x1080.

[0070] Another example, in some embodiments, when the resolution rises from 1920x1080 to 2560x1440, |1920x1080 - 2560x1440| pixel points will be lost, and the number of lost pixel points can also be referred to as the difference between the two resolutions. The predicted distortion degree is the ratio between the difference and the original preset resolution, that is, |1920x1080 - 2560x1440| / 1920x1080.

[0071] Furthermore, the present invention further includes the steps of: Obtaining the display size of the icon on the current display interface; When the display size is less than the preset size threshold and the number of vector element objects of the icon is greater than the set first number threshold, it is recommended to use the bitmap display method for display.

[0072] Thus, it is possible to enhance the display contrast of the icon using the richness of bitmap colors to strengthen the visual effect, and at the same time reduce the excessive occupation of resources by vector drawing.

[0073] It can be understood that the above multiple switching mechanisms can be used alone or in combination in different embodiments, and the order of step descriptions in the above embodiments is only an exemplary illustration, and the present invention does not limit it.

[0074] The following will exemplarily explain and illustrate the technical solutions and technical effects adopted by the present invention through a specific embodiment. The icon display involves the following process: Designers design and output the required vector graphics according to the icon display requirements; Convert the vector graphics into vector element objects described in XAML (Extensible Application Markup Language) language according to the graphic elements (WPF, Windows Presentation Foundation, a Windows-based user interface framework); The user interface framework automatically retrieves and uses the corresponding vector graphic objects (DrawingImage) using the binding mechanism. For example, a vector image object is associated and bound with multiple vector element objects.

[0075] Furthermore, in this embodiment, designers design graphics that meet the requirements of application program display icons and output them as vector graphic resources in SVG format. WPF has a built-in drawing module that consists of simple vector elements to form complex scenes. The vector graphics generated in the above steps are decomposed into numerous geometric graphic elements. More complex graphics use the Geometry Mini-Language to mark and identify detailed graphic elements, and use the GeometryGroup object to combine these graphic elements into graphics that WPF can recognize and display. The key role of this step is to convert the vector graphic file in SVG format into a graphic that WPF can directly draw, and can centrally convert the required SVG graphic resources into DrawingImage objects that WPF can recognize, and store them as text described in XAML (Extensible Application Markup Language) language in a XAML format document.

[0076] The above resources are managed by a ResourceDictionary object and provide a retrieval interface. The controls of WPF locate and retrieve the corresponding DrawingImage graphic resources through a uniquely identified ID, and this process is automatically completed through the binding behavior of WPF.

[0077] <ribbontogglebutton image="{Binding Source=ImageSource.Instance, Path=LINE}">< / ribbontogglebutton> The WPF application that completes the above steps should set the adaptive DPI change response, that is, add an app.manifest file and add the following code to enable DPI adaptation.

[0078] <application xmlns="urn:schemas-microsoft-com:asm.v3"> <windowssettings> <dpiaware xmlns="http: / / schemas.microsoft.com / SMI / 2005 / WindowsSettings">true / PM< / dpiaware> <longpathaware xmlns="http: / / schemas.microsoft.com / SMI / 2016 / WindowsSettings">true< / longpathaware> < / windowssettings> < / application> It should be noted that a bitmap is a collection of pixels under a dot matrix. As long as there is a large enough pixel density, an image with rich colors can be produced. However, for the controls in the application's graphical interface, pixel density is not the primary consideration. When scaling and rotating, bitmaps with low pixel density are easily distorted, and the image file size is positively correlated with the pixel density. In contrast, for vector graphics in SVG format, the graphic content is represented by vector elements. Therefore, the graphic file capacity is smaller, and the image will not be distorted during operations such as zooming in, zooming out, or rotating. It is an ideal choice for the control icon resources in the application's graphical interface.

[0079] WPF cannot directly use SVG format files and add them to control icons. Third-party conversion tools convert vector images into bitmap resources for application use. This process not only causes excessive resource usage and performance loss but also does not consider the actual usage scenarios of the control icon resources in the application's graphical interface. As a result, the vector element graphics support in WPF is abandoned, and a fully scalable user interface cannot be designed by better integrating with the resolution independence feature of WPF.

[0080] Furthermore, to prove the beneficial technical effects of the present invention, the present invention also provides the following test cases for verification: For Figure 2 the display of the test icon shown, directly using bitmap resources for Figure 2 display, the involved bitmap file contains a 16-bit and a 32-bit graphic, and the file size is 5.3 kb. When using an SVG file for display, its file size is 1.36 kb.

[0081] It should be noted that the graphic elements inside the icons actually to be displayed on the operation interface are often more complex (for example, the graphic structure of the graphic elements is more complex, and the color richness is also higher), and the icons involved in the operation interface are also very diverse. At this time, the file size occupied by the resources for displaying the icons will increase significantly, and the advantages of the SVG files adopted by the present invention will be more prominent.

[0082] In addition, from the perspective of resolution: After generating and starting the application by implementing the steps of the technical solution, connect the host to dual monitors, set the resolutions of different monitors through the system, and move the application to be displayed on different monitors. It can be observed that the bitmap resources can be clearly displayed at the matching resolution, but cannot achieve the effect of being clearly displayed at different resolutions like SVG resources.

[0083] On the other hand, the present invention also provides an icon display method, which includes the steps of: S103, receiving a first call signal sent by a user, where the first call signal includes: icon information of an icon to be recognized; In response to the first call signal, obtaining a corresponding first drawing element, and further executing S104, using a first display method to draw the icon content on a first canvas according to the first drawing element, so as to display the icon on the current display interface; Among them, the first drawing element is obtained by the following steps: S101, obtaining the icon content of at least one icon; S102, using a first drawing method to generate a first drawing element according to the icon content, where the first drawing element includes: a program markup language, a first label; Among them, S102 includes: S1021, generating at least one corresponding vector graphic according to at least one piece of the icon content; S1022, respectively recognizing the vector graphics as at least one vector element object; where the vector element object is a basic geometric unit in the vector graphic, and the vector element object is described by a first drawing language, and the first drawing language is used to define the color, shape, size, outline, and position of the basic geometric unit; S1023, generating a corresponding program markup language according to the first drawing language, and the program markup language or the vector element object is associated with a first label, and the first label records icon information.

[0084] Embodiment 2: See Figure 3 As shown, the present invention also provides an icon display system, including: An obtaining module, configured to obtain the icon content of at least one icon; A generating module, configured to generate a first drawing element according to the icon content by using a first drawing method, where the first drawing element includes: a program markup language, a first label; Among them, the generating module includes: A first generating unit, configured to generate at least one corresponding vector graphic according to at least one piece of the icon content; A first recognizing unit, configured to respectively recognize the vector graphics as at least one vector element object; where the vector element object is a basic geometric unit in the vector graphic, and the vector element object is described by a first drawing language, and the first drawing language is used to define the color, shape, size, outline, and position of the basic geometric unit; A second generation unit, configured to generate a corresponding program markup language according to the first drawing language, and a first label is associated with the program markup language or the vector element object, and the first label records icon information; A receiving module, configured to receive a first call signal sent by a user, where the first call signal includes: icon information of an icon to be recognized; A display module, configured to draw the icon content on a first canvas according to the first drawing element by using a first display method, so as to display the icon on a current display interface.

[0085] It can be understood that the system provided by the present invention can implement the functions or steps of any of the above methods, which will not be elaborated herein.

[0086] The present invention further provides a computing device, where the computing device includes a processor, the processor is coupled to a memory, and the processor is configured to store instructions, and when the instructions are executed by the processor, the computing device is enabled to execute the method as described in any one of the embodiments.

[0087] The present invention further provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed, a computer is enabled to execute the method as described in any one of the embodiments.

[0088] The present invention further provides a computer program product, where instructions are included in the computer program product, and when the instructions are executed, a computer is enabled to implement the method as described in any one of the embodiments.

[0089] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a computer terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0091] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose of the present invention and the scope protected by the claims. All of these fall within the protection scope of the present invention.

Claims

1. An icon display method, characterized in that, Including the steps: S101, obtaining the icon content of at least one icon; S102, generating a first drawing element according to the icon content by using a first drawing method, where the first drawing element includes: a program markup language, a first label; Among them, S102 includes: S1021, generating at least one corresponding vector graphic according to at least one of the icon contents; S1022, respectively identifying the vector graphics as at least one vector element object; where the vector element object is a basic geometric unit in the vector graphic, and the vector element object is described by a first drawing language, and the first drawing language is used to define the color, shape, size, outline, and position of the basic geometric unit; S1023, generating a corresponding program markup language according to the first drawing language, and the program markup language or the vector element object is associated with a first label, and the first label records icon information; S103, receiving a first call signal sent by the user, where the first call signal includes: icon information of the icon to be recognized; S104, using a first display method to draw the icon content on a first canvas according to the first drawing element, so as to display the icon on the current display interface.

2. The icon display method according to claim 1, characterized in that, When multiple vector element objects are recognized in S1022, correspondingly, S1023 includes the steps: S10221, determining whether there are at least two vector element objects with the same first drawing language among the multiple vector element objects; if so, identifying the vector element objects as duplicate objects; S10222, retaining one vector element object from the duplicate objects as a drawing element object, and recording the icon information of the duplicate objects in the corresponding first label; S10223, generating a corresponding program markup language for the drawing element object.

3. The icon display method according to claim 1, characterized in that It further includes the steps: S105, generating a second drawing element according to the icon content by using a second drawing method, where the second drawing element includes: a pixel point information set, a second label; where the pixel point information set includes: multiple pixel points, and each pixel point records a position and a color value, and the second label records icon information; S106, using a second display method to draw the icon content on a second canvas according to the second drawing element, so as to display the icon on the current display interface.

4. A method for icon display according to claim 3, characterized in that, When there are at least two icons to be displayed, S104 includes the steps: S1041, identifying corresponding multiple vector element objects according to the icon information of at least two; S1042, classifying the vector element objects into duplicate objects and non-duplicate objects, where when the first drawing language of the drawing element object is different from that of the other drawing element objects, the drawing element object is identified as a non-duplicate object; S1043, creating at least one first drawing area on the first canvas, and drawing the duplicate objects on the first drawing area according to the program markup language; S1044, create at least one second drawing area on the first canvas, and draw the non-repeating object on the second drawing area according to the program markup language; S1045, when displaying one of the icons, find the repeating object and non-repeating object associated with the icon according to the first label; S1046, combine the repeating object and the non-repeating object to display the icon.

5. A method for icon display according to claim 1, characterized in that, When the icon to be recognized has at least two colors, S104 includes the steps of: (1) Identify the colors of multiple vector element objects; (2) Group the vector element objects according to the colors to obtain multiple vector drawing groups, and the vector element objects in one vector drawing group have the same color; (3) Select a drawing pen according to the color to be drawn; (4) Use the drawing pen to draw one of the vector drawing groups on the first canvas; (5) When the current vector drawing group finishes drawing, determine whether there is a remaining color to be drawn; (6) If so, generate a pen switching signal, if not, end the drawing; (7) In response to the pen switching signal, switch to a new drawing pen according to the remaining color to be drawn, and return to (4).

6. A method for icon display according to claim 3, characterized in that, Before S104 or S106, it further includes the steps of: S107, identify the color vividness of the icon; S108, determine whether the color vividness is greater than a set first degree threshold, if so, execute S106, if not, execute S104.

7. A method for icon display according to claim 2, characterized in that, Before S104 or S106, it further includes the steps of: Identify the number of vector element objects of the icon; Determine whether the number is greater than a set first number threshold, if so, execute S106, if not, execute S104.

8. An icon display system, characterized in that, It includes: An acquisition module, used to acquire the icon content of at least one icon; A generation module, used to generate first drawing elements according to the icon content by using a first drawing method, and the first drawing elements include: program markup language, first label; Among them, the generation module includes: A first generation unit, used to generate at least one corresponding vector graphic according to at least one of the icon contents; A first recognition unit, used to respectively recognize the vector graphics as at least one vector element object; wherein, the vector element object is a basic geometric unit in the vector graphic, and the vector element object is described by a first drawing language, and the first drawing language is used to define the color, shape, size, contour, and position of the basic geometric unit; A second generation unit, used to generate a corresponding program markup language according to the first drawing language, and the program markup language or the vector element object is associated with a first label, and the first label records icon information; A receiving module, used to receive a first call signal sent by the user, and the first call signal includes: icon information of the icon to be recognized; A display module, used to draw the icon content on the first canvas according to the first drawing element by using a first display method, so as to display the icon on the current display interface.

9. A computer-readable storage medium, characterized in that, The storage medium stores a program or instructions, and when the program or instructions are run, an icon display method as described in any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that, The computer program product stores a program or instructions, and when the program or instructions are run, an icon display method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Icon display method and icon display device

    CN106843639A

  • Icon processing method and apparatus, computer device and storage medium

    CN107301046A

  • Terminal and control icon display method

    CN112817667A

  • Scalable vector graphics processing method and system

    CN111414107A

  • Method and device for processing scalable vector graphic icon

    CN112835574A