API Reference
Class
OfficeImageComposer
Shared dependency-free image page composer for raster and SVG layer output.
Inheritance
- Object
- OfficeImageComposer
Methods
public static Byte[] ComposePng(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<OfficeRasterCanvas> beforeLayers = null, Action<OfficeRasterCanvas> afterLayers = null) #Returns:
Byte[]Composes raster layers onto a new image and returns encoded PNG bytes.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas} = null
- afterLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas} = null
ComposeRaster 3 overloads
public static OfficeRasterImage ComposeRaster(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<OfficeRasterCanvas> beforeLayers = null, Action<OfficeRasterCanvas> afterLayers = null) #Returns:
OfficeRasterImageComposes raster layers onto a new image.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas} = null
- afterLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas} = null
public static OfficeRasterImage ComposeRaster(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<OfficeRasterCanvas> beforeLayers, Action<OfficeRasterCanvas> afterLayers, OfficeFontFaceCollection fonts) #Returns:
OfficeRasterImageComposes raster layers using scoped fonts for text drawn by the layer callbacks.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas}
- afterLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas}
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
public static OfficeRasterImage ComposeRaster(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<OfficeRasterCanvas> beforeLayers, Action<OfficeRasterCanvas> afterLayers, OfficeFontFaceCollection fonts, CancellationToken cancellationToken) #Returns:
OfficeRasterImageComposes raster layers using scoped fonts and observes cancellation throughout raster drawing.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas}
- afterLayers System.Action{OfficeIMO.Drawing.OfficeRasterCanvas}
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
- cancellationToken System.Threading.CancellationToken
public static String ComposeSvg(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<StringBuilder> beforeLayers = null, Action<StringBuilder> afterLayers = null) #Returns:
StringComposes SVG layers into a root SVG document.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{System.Text.StringBuilder} = null
- afterLayers System.Action{System.Text.StringBuilder} = null
public static Byte[] ComposeSvgBytes(Int32 width, Int32 height, OfficeColor backgroundColor, IEnumerable<OfficeImageLayer> layers, Action<StringBuilder> beforeLayers = null, Action<StringBuilder> afterLayers = null) #Returns:
Byte[]Composes SVG layers into a root SVG document and returns UTF-8 encoded bytes.
Parameters
- width System.Int32
- height System.Int32
- backgroundColor OfficeIMO.Drawing.OfficeColor
- layers System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeImageLayer}
- beforeLayers System.Action{System.Text.StringBuilder} = null
- afterLayers System.Action{System.Text.StringBuilder} = null
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object