Difference between revisions of "SVG support in CEGUI"
(Created page with " == Possible use-cases for SVG Images == A user wants to load an SVG-file and then use the resulting SVGImage like a regular raster graphics image (BasicImage)") |
(→Possible use-cases for SVG Images) |
||
Line 1: | Line 1: | ||
− | + | The purpose of this document is to determine how the SVG loading/handling and storage of related datastructures should be done. | |
+ | Specific questions that need to be decided upon are (in the brackets the current state of decision will be noted, if existing): | ||
+ | Module-integration: | ||
+ | * SVGImage and related files will be a part of CEGUI Core-library (<span style="color:#0f0">yes</span>) | ||
+ | * Vector graphics rendering related files will be part of CEGUI Core-library (<span style="color:#0f0">yes</span>) | ||
+ | * The SVG File loading and parsing will be part of CEGUI Core-library (<span style="color:#FFFFF5">undecided</span>) | ||
+ | Structure: | ||
+ | * SVGImage will be a subclass of CEGUI::Image (<span style="color:#0f0">yes</span>) | ||
+ | * SVGImage contains the cached information required for rendering (<span style="color:#0f0">yes</span>) | ||
+ | * A class named VGShapeData or VectorShapeData or something like that, will contain the abstract information on the shapes that are supposed to be cached and drawn (<span style="color:#FFFFF5">undecided</span>) | ||
+ | * SVGImage will contain a reference to an shape-data class, whereas the class that contains (<span style="color:#FFFFF5">undecided</span>) | ||
+ | |||
+ | Notes: | ||
+ | Probably SVGImage should rather be called VGImage or VectorImage or VectorGraphicsImage. This is because I think it could be easily done that the class would not require actual SVG data but instead only require shape information for drawing. The SVG data can be converted into such shape information. That way users can create their own shape information and use it in a VGImage. | ||
+ | |||
+ | |||
+ | == Possible use-cases for SVG Images == | ||
+ | As justification for the above suggestions following use-cases can be considered: | ||
− | A user wants to load an SVG-file and then use the resulting SVGImage like a regular raster graphics image (BasicImage) | + | * '''A user wants to load an SVG-file and then use the resulting SVGImage like a regular raster graphics image (BasicImage)''' |
Revision as of 15:59, 18 June 2013
The purpose of this document is to determine how the SVG loading/handling and storage of related datastructures should be done.
Specific questions that need to be decided upon are (in the brackets the current state of decision will be noted, if existing): Module-integration:
- SVGImage and related files will be a part of CEGUI Core-library (yes)
- Vector graphics rendering related files will be part of CEGUI Core-library (yes)
- The SVG File loading and parsing will be part of CEGUI Core-library (undecided)
Structure:
- SVGImage will be a subclass of CEGUI::Image (yes)
- SVGImage contains the cached information required for rendering (yes)
- A class named VGShapeData or VectorShapeData or something like that, will contain the abstract information on the shapes that are supposed to be cached and drawn (undecided)
- SVGImage will contain a reference to an shape-data class, whereas the class that contains (undecided)
Notes: Probably SVGImage should rather be called VGImage or VectorImage or VectorGraphicsImage. This is because I think it could be easily done that the class would not require actual SVG data but instead only require shape information for drawing. The SVG data can be converted into such shape information. That way users can create their own shape information and use it in a VGImage.
Possible use-cases for SVG Images
As justification for the above suggestions following use-cases can be considered:
- A user wants to load an SVG-file and then use the resulting SVGImage like a regular raster graphics image (BasicImage)