Center labeling method of SVG file, terminal and computer readable storage medium
A file and storage technology, applied to terminals and computer-readable storage media, and the field of central labeling of SVG files, which can solve problems such as difficult calculation of the center position, inability to ensure that the fitting rectangle is placed inside the path, and excessively large borders, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment approach
[0037] It should be noted that the structures, proportions, sizes, etc. shown in this specification are only used to cooperate with the content disclosed in the specification for the understanding and reading of those familiar with this technology, and are not used to limit the conditions for the implementation of the present invention , any modification of structure, change of proportional relationship or adjustment of size shall still fall within the scope covered by the technical content disclosed in the present invention without affecting the effect and purpose of the present invention. .
[0038] At the same time, terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of description and are not used to limit this specification. The practicable scope of the invention and the change or adjustment of its relative relationship shall also be regarded as the practicable scope of the present invention without...
Embodiment 1
[0040] Such as figure 1 Shown, a kind of center marking method of SVG, described method comprises:
[0041] Rasterize the SVG file to obtain a binarized dataset;
[0042] Specifically: the SVG processing system 103 in the terminal reads the SVG file, and parses the SVG file based on the DOM (Document ObjectModel) structure, so as to obtain each element of the SVG file. For example, the elements include: path (path), And acquire the specific attribute information of the path, the specific attribute information of the path includes: (starting point, moving point, closing point). Traverse all paths, convert each path into binary data through rasterization operation, and the size of the rasterized image can be equal to the original SVG image, for example, the original image has a width of 500, The height is 500, and the width and height of the binarized data obtained after processing are also 500.
[0043] Since SVG is a vector image, binarized data with different resolutions c...
Embodiment 2
[0074] The magnitude of the SVG file is relatively large. In order to achieve the display effect, the path and structure of most SVG files are complex. Using the conventional minimum border (bounding box) or manual labeling methods, the final effect or processing time cannot meet the requirements.
[0075] SVG is a language defined in XML for describing two-dimensional vector and vector / raster graphics.
[0076] In view of the above problems, the present invention develops a terminal and a computer-readable storage medium, and provides a client (such as a Web front-end), so that only the corresponding SVG file needs to be submitted at the client, and the required configuration parameters can be adjusted by adjusting the corresponding configuration parameters. The SVG center label and the corresponding adaptation rectangle are processed, and the processed SVG file can be downloaded or stored.
[0077] The SVG processing annotation method provided in this embodiment can be used ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com