Contains methods to render a Page to an Avalonia.Controls.Canvas.
More...
|
enum | TextOptions |
| Defines whether text items should be converted into paths when drawing. More...
|
|
|
static Avalonia.Controls.Canvas | PaintToCanvas (this Page page, TextOptions textOption=TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
| Render a Page to an Avalonia.Controls.Canvas. More...
|
|
static Avalonia.Controls.Control | PaintToCanvas (this Page page, bool graphicsAsControls, TextOptions textOption=TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
| Render a Page to an Avalonia.Controls.Control. More...
|
|
static Avalonia.Controls.Control | PaintToCanvas (this Page page, bool graphicsAsControls, Dictionary< string, Delegate > taggedActions, bool removeTaggedActionsAfterExecution=true, TextOptions textOption=TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
| Render a Page to an Avalonia.Controls.Control. More...
|
|
static Avalonia.Controls.Canvas | PaintToCanvas (this Page page, Dictionary< string, Delegate > taggedActions, bool removeTaggedActionsAfterExecution=true, TextOptions textOption=TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
| Render a Page to an Avalonia.Controls.Control. More...
|
|
static AnimatedCanvas | PaintToAnimatedCanvas (this Animation animation, double frameRate=60, double durationScaling=1, TextOptions textOption=TextOptions.ConvertIfNecessary, FilterOption filterOption=default) |
| Render an Animation to an Avalonia.Controls.Control. More...
|
|
Contains methods to render a Page to an Avalonia.Controls.Canvas.
Definition at line 2604 of file AvaloniaContext.cs.
◆ TextOptions
Defines whether text items should be converted into paths when drawing.
Definition at line 2609 of file AvaloniaContext.cs.
◆ PaintToAnimatedCanvas()
static AnimatedCanvas VectSharp.Canvas.AvaloniaContextInterpreter.PaintToAnimatedCanvas |
( |
this Animation |
animation, |
|
|
double |
frameRate = 60 , |
|
|
double |
durationScaling = 1 , |
|
|
TextOptions |
textOption = TextOptions.ConvertIfNecessary , |
|
|
FilterOption |
filterOption = default |
|
) |
| |
|
static |
Render an Animation to an Avalonia.Controls.Control.
- Parameters
-
animation | The Animation to render. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
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. |
- Returns
- An Avalonia.Controls.Control containing the rendered animation.
Definition at line 2727 of file AvaloniaContext.cs.
◆ PaintToCanvas() [1/4]
static Avalonia.Controls.Control VectSharp.Canvas.AvaloniaContextInterpreter.PaintToCanvas |
( |
this Page |
page, |
|
|
bool |
graphicsAsControls, |
|
|
Dictionary< string, Delegate > |
taggedActions, |
|
|
bool |
removeTaggedActionsAfterExecution = true , |
|
|
TextOptions |
textOption = TextOptions.ConvertIfNecessary , |
|
|
FilterOption |
filterOption = default |
|
) |
| |
|
static |
Render a Page to an Avalonia.Controls.Control.
- Parameters
-
page | The Page to render. |
graphicsAsControls | If this is true, each graphics object (e.g. paths, text...) is rendered as a separate Avalonia.Controls.Control. Otherwise, they are directly rendered onto the drawing context (which is faster, but does not allow interactivity). |
taggedActions | A Dictionary<String, Delegate> containing the Actions that will be performed on items with the corresponding tag. If graphicsAsControls is true, the delegates should be voids that accept one parameter of type TextBlock or Path (depending on the tagged item), otherwise, they should accept one parameter of type RenderAction and return an IEnumerable<RenderAction> of the actions that will actually be performed. |
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. |
- Returns
- An Avalonia.Controls.Control containing the rendered graphics objects.
Definition at line 2679 of file AvaloniaContext.cs.
◆ PaintToCanvas() [2/4]
static Avalonia.Controls.Control VectSharp.Canvas.AvaloniaContextInterpreter.PaintToCanvas |
( |
this Page |
page, |
|
|
bool |
graphicsAsControls, |
|
|
TextOptions |
textOption = TextOptions.ConvertIfNecessary , |
|
|
FilterOption |
filterOption = default |
|
) |
| |
|
static |
Render a Page to an Avalonia.Controls.Control.
- Parameters
-
page | The Page to render. |
graphicsAsControls | If this is true, each graphics object (e.g. paths, text...) is rendered as a separate Avalonia.Controls.Control. Otherwise, they are directly rendered onto the drawing context (which is faster, but does not allow interactivity). |
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. |
- Returns
- An Avalonia.Controls.Control containing the rendered graphics objects.
Definition at line 2652 of file AvaloniaContext.cs.
◆ PaintToCanvas() [3/4]
static Avalonia.Controls.Canvas VectSharp.Canvas.AvaloniaContextInterpreter.PaintToCanvas |
( |
this Page |
page, |
|
|
Dictionary< string, Delegate > |
taggedActions, |
|
|
bool |
removeTaggedActionsAfterExecution = true , |
|
|
TextOptions |
textOption = TextOptions.ConvertIfNecessary , |
|
|
FilterOption |
filterOption = default |
|
) |
| |
|
static |
Render a Page to an Avalonia.Controls.Control.
- Parameters
-
page | The Page to render. |
taggedActions | A Dictionary<String, Delegate> containing the Actions that will be performed on items with the corresponding tag. The delegates should accept one parameter of type TextBlock or Path (depending on the tagged item). |
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. |
- Returns
- An Avalonia.Controls.Control containing the rendered graphics objects.
Definition at line 2705 of file AvaloniaContext.cs.
◆ PaintToCanvas() [4/4]
static Avalonia.Controls.Canvas VectSharp.Canvas.AvaloniaContextInterpreter.PaintToCanvas |
( |
this Page |
page, |
|
|
TextOptions |
textOption = TextOptions.ConvertIfNecessary , |
|
|
FilterOption |
filterOption = default |
|
) |
| |
|
static |
Render a Page to an Avalonia.Controls.Canvas.
- Parameters
-
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. |
- Returns
- An Avalonia.Controls.Canvas containing the rendered graphics objects.
Definition at line 2634 of file AvaloniaContext.cs.
The documentation for this class was generated from the following file: