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.SVGZfor saving documents as compressed SVG. - Added new overloads in
SVGDocument.Save(...)to handle.svgzfiles and manage document resources more granularly.
- Introduced
Rendering Improvements
- Added
UseAntialiasinginImageRenderingOptionsto enable or disable antialiasing for image output. - Introduced
UseHintinginTextOptionsfor fine-tuning text rendering.
- Added
User Agent Service Updates
- New
ShowImagePlaceholdersproperty inIUserAgentService, allowing control over placeholder images when external resources are unsupported.
- New
Enhanced Font Styling
- Transitioned to a new enum
WebFontStylein places whereFontStylewas previously used (e.g.,GraphicContext.FontStyle,ICanvas.FontStyle).
- Transitioned to a new enum
SVG Builder Extensions
Accumulate<TBuilder>andAdditive<TBuilder>: Accept strongly-typed parameters (AccumulateandAdditive).FontSizeAdjust<TBuilder>: Receives anAdjustSizeparameter with descriptive documentation.
Event Handling
TransformationMatrixChangedinGraphicContext: 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): ReplacesFontStylein 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
TransformationMatrixChangedinGraphicContext: Uses a more descriptive event-handler delegate (TransformationMatrixChangedEventHandler).
Modified APIs
Rendering Parameter Types
- Where applicable,
Accumulate<TBuilder>andAdditive<TBuilder>now expect explicit enum arguments (AccumulateandAdditive) instead of placeholders.
- Where applicable,
Replaced
FontStylewithWebFontStyleGraphicContext.FontStyleICanvas.FontStyle
Removed APIs
Removal of
IBitmapinAspose.Svg.Drawing- Entire
IBitmapinterface and related methods/properties (e.g.,ApplyOpacity,DrawBitmap,Save,SetTransparent, etc.) are no longer available.
- Entire
Rendering Properties
ImageRenderingOptions.SmoothingModeTextOptions.TextRenderingHint- Both replaced by
UseAntialiasingandUseHinting, respectively.
Unused Font-Related Properties
ITrueTypeFont.FontDataITrueTypeFont.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.