Browse our Products
Aspose.SVG for .NET 25.1 Release Notes
Major Features
We are pleased to announce the January release of Aspose.SVG for .NET 25.1.0. This version brings several noteworthy updates, including support for saving to compressed SVGZ format, new properties for rendering options, enhancements to the SVG builder extension methods, and significant changes to some existing APIs. These improvements are aimed at providing a more streamlined, powerful, and flexible experience for developers working with SVG documents in .NET.
Enhancements and Fixes
SVGZ Support and New
Save(...)
Overloads- Introduced
SVGSaveFormat.SVGZ
for saving documents as compressed SVG. - Added new overloads in
SVGDocument.Save(...)
to handle.svgz
files and manage document resources more granularly.
- Introduced
Rendering Improvements
- Added
UseAntialiasing
inImageRenderingOptions
to enable or disable antialiasing for image output. - Introduced
UseHinting
inTextOptions
for fine-tuning text rendering.
- Added
User Agent Service Updates
- New
ShowImagePlaceholders
property inIUserAgentService
, allowing control over placeholder images when external resources are unsupported.
- New
Enhanced Font Styling
- Transitioned to a new enum
WebFontStyle
in places whereFontStyle
was previously used (e.g.,GraphicContext.FontStyle
,ICanvas.FontStyle
).
- Transitioned to a new enum
SVG Builder Extensions
Accumulate<TBuilder>
andAdditive<TBuilder>
: Accept strongly-typed parameters (Accumulate
andAdditive
).FontSizeAdjust<TBuilder>
: Receives anAdjustSize
parameter with descriptive documentation.
Event Handling
TransformationMatrixChanged
inGraphicContext
: Now uses a clearer event delegate type (TransformationMatrixChangedEventHandler
).
Public API Changes
Added and Modified APIs
Compressed SVG (SVGZ) Support
SVGSaveFormat.SVGZ
: A new enum value to save files as compressed SVGZ.SVGDocument.Save(string path, SVGSaveFormat saveFormat, SVGSaveOptions saveOptions)
SVGDocument.Save(Url url, SVGSaveFormat saveFormat, SVGSaveOptions saveOptions)
SVGDocument.Save(ResourceHandler resourceHandler, SVGSaveFormat saveFormat, SVGSaveOptions saveOptions)
These overloads enable saving in SVGZ format and give finer control over resource handling.
Rendering Properties
ImageRenderingOptions.UseAntialiasing
(bool): Determines if antialiasing is applied during image rendering.TextOptions.UseHinting
(bool): Determines whether font hinting is enabled for text rendering.
User Agent Service
IUserAgentService.ShowImagePlaceholders
(bool): Specifies whether placeholder images should be displayed for unsupported resources.
Font Style Handling
WebFontStyle
(enum): ReplacesFontStyle
in certain rendering contexts (e.g.,GraphicContext.FontStyle
,ICanvas.FontStyle
).
SVG Builder Extensions
Accumulate<TBuilder>(this TBuilder, Accumulate value)
: Sets the'accumulate'
attribute for repeated animations.Additive<TBuilder>(this TBuilder, Additive value)
: Sets the'additive'
attribute for how animation values add to the base value.FontSizeAdjust<TBuilder>(this TBuilder, AdjustSize value)
: Sets the'font-size-adjust'
attribute with a predefined adjust size.
Event Signature
TransformationMatrixChanged
inGraphicContext
: Uses a more descriptive event-handler delegate (TransformationMatrixChangedEventHandler
).
Modified APIs
Rendering Parameter Types
- Where applicable,
Accumulate<TBuilder>
andAdditive<TBuilder>
now expect explicit enum arguments (Accumulate
andAdditive
) instead of placeholders.
- Where applicable,
Replaced
FontStyle
withWebFontStyle
GraphicContext.FontStyle
ICanvas.FontStyle
Removed APIs
Removal of
IBitmap
inAspose.Svg.Drawing
- Entire
IBitmap
interface and related methods/properties (e.g.,ApplyOpacity
,DrawBitmap
,Save
,SetTransparent
, etc.) are no longer available.
- Entire
Rendering Properties
ImageRenderingOptions.SmoothingMode
TextOptions.TextRenderingHint
- Both replaced by
UseAntialiasing
andUseHinting
, respectively.
Unused Font-Related Properties
ITrueTypeFont.FontData
ITrueTypeFont.Style
- Removed in favor of new or existing mechanisms that provide equivalent functionality.
These API changes are intended to streamline and modernize the Aspose.SVG for .NET library, providing enhanced performance, clarity, and flexibility. We recommend reviewing any affected code (particularly where removed interfaces or properties were used) and updating to the new APIs or enumerations where appropriate. If you have questions or need further assistance, please consult the updated documentation or contact Aspose support.