VectSharp
2.2.1
A light library for C# vector graphics
|
Contains methods to render a Page to an Avalonia.Controls.Canvas using the SkiaSharp renderer. More...
Static Public Member Functions | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Document document, double? width=null, double? height=null, Colour? background=null, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image. More... | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Document document, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, bool removeTaggedActionsAfterExecution=true, double? width=null, double? height=null, Colour? background=null, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image. More... | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Document document, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, Dictionary< string,(SKBitmap, bool)> images, bool removeTaggedActionsAfterExecution=true, double? width=null, double? height=null, Colour? background=null, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image. More... | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Page page, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharp renderer. More... | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Page page, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, bool removeTaggedActionsAfterExecution=true, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharpRenderer. More... | |
static SKMultiLayerRenderCanvas | PaintToSKCanvas (this Page page, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, Dictionary< string,(SKBitmap, bool)> images, bool removeTaggedActionsAfterExecution=true, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharpRenderer. More... | |
static SKRenderContext | CopyToSKRenderContext (this Page page, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas. More... | |
static SKRenderContext | CopyToSKRenderContext (this Page page, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, bool removeTaggedActionsAfterExecution=true, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas. More... | |
static SKRenderContext | CopyToSKRenderContext (this Page page, Dictionary< string, Func< SKRenderAction, IEnumerable< SKRenderAction >>> taggedActions, Dictionary< string,(SKBitmap, bool)> images, bool removeTaggedActionsAfterExecution=true, AvaloniaContextInterpreter.TextOptions textOption=AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas. More... | |
static RasterImage | Rasterise (this Graphics graphics, Rectangle region, double scale, bool interpolate) |
Rasterise a region of a Graphics object. More... | |
Contains methods to render a Page to an Avalonia.Controls.Canvas using the SkiaSharp renderer.
Definition at line 1534 of file SKRenderContext.cs.
|
static |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas.
page | The Page to render. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1655 of file SKRenderContext.cs.
|
static |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas.
page | The Page to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1670 of file SKRenderContext.cs.
|
static |
Render a Page to a SKRenderContext. This can be drawn using the SkiaSharpRenderer by adding it to a SKMultiLayerRenderCanvas.
page | The Page to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
images | A dictionary that associates to each raster image path (or data URL) the image rendered as a SKBitmap and a boolean value indicating whether it should be drawn as "pixelated" or not. This will be populated automatically as the page is rendered. If you are rendering multiple Pages (or you are rendering the same page multiple times), it will be beneficial to keep a reference to this dictionary and pass it again on further rendering requests; otherwise, you can just pass an empty dictionary. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1687 of file SKRenderContext.cs.
|
static |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image.
document | The Document to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
width | The width of the document. If this is null , the width of the largest page is used. |
height | The height of the document. If this is null , the height of the largest page is used. |
background | The background colour of the document. If this is null , a transparent background is used. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1579 of file SKRenderContext.cs.
|
static |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image.
document | The Document to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
images | A dictionary that associates to each raster image path (or data URL) the image rendered as a SKBitmap and a boolean value indicating whether it should be drawn as "pixelated" or not. This will be populated automatically as the page is rendered. If you are rendering multiple Pages (or you are rendering the same page multiple times), it will be beneficial to keep a reference to this dictionary and pass it again on further rendering requests; otherwise, you can just pass an empty dictionary. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
width | The width of the document. If this is null , the width of the largest page is used. |
height | The height of the document. If this is null , the height of the largest page is used. |
background | The background colour of the document. If this is null , a transparent background is used. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1599 of file SKRenderContext.cs.
|
static |
Render a Document to an Avalonia.Controls.Canvas using the SkiaSharp renderer. Each page corresponds to a layer in the image.
document | The Document to render. |
width | The width of the document. If this is null , the width of the largest page is used. |
height | The height of the document. If this is null , the height of the largest page is used. |
background | The background colour of the document. If this is null , a transparent background is used. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1561 of file SKRenderContext.cs.
|
static |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharp renderer.
page | The Page to render. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1611 of file SKRenderContext.cs.
|
static |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharpRenderer.
page | The Page to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1626 of file SKRenderContext.cs.
|
static |
Render a Page to an Avalonia.Controls.Canvas using the SkiaSharpRenderer.
page | The Page to render. |
taggedActions | A Dictionary containing the actions that will be performed on items with the corresponding tag. These should be functions that accept one parameter of type SKRenderAction and return an IEnumerable<SKRenderAction> of the render actions that will actually be added to the plot. |
images | A dictionary that associates to each raster image path (or data URL) the image rendered as a SKBitmap and a boolean value indicating whether it should be drawn as "pixelated" or not. This will be populated automatically as the page is rendered. If you are rendering multiple Pages (or you are rendering the same page multiple times), it will be beneficial to keep a reference to this dictionary and pass it again on further rendering requests; otherwise, you can just pass an empty dictionary. |
removeTaggedActionsAfterExecution | Whether the actions should be removed from taggedActions after their execution. Set to false if the same action should be performed on multiple items with the same tag. |
textOption | Defines whether text items should be converted into paths when drawing. |
filterOption | Defines how and whether image filters should be rasterised when rendering the image. |
Definition at line 1643 of file SKRenderContext.cs.
|
static |
Rasterise a region of a Graphics object.
graphics | The Graphics object that will be rasterised. |
region | The region of the graphics that will be rasterised. |
scale | The scale at which the image will be rendered. |
interpolate | Whether the resulting image should be interpolated or not when it is drawn on another Graphics surface. |
Definition at line 1712 of file SKRenderContext.cs.