VectSharp
2.2.1
A light library for C# vector graphics
|
Represents a light-weight rendering action. More...
Public Types | |
enum | ActionTypes { ActionTypes.Path, ActionTypes.Text, ActionTypes.RasterImage } |
Types of rendering actions. More... | |
Public Member Functions | |
void | BringToFront () |
Brings the render action to the front of the rendering queue. This method can only be invoked after the output has been fully initialised. More... | |
void | SendToBack () |
Brings the render action to the back of the rendering queue. This method can only be invoked after the output has been fully initialised. More... | |
Static Public Member Functions | |
static RenderAction | PathAction (Geometry geometry, Pen stroke, IBrush fill, Avalonia.Matrix transform, Geometry clippingPath, string tag=null) |
Creates a new RenderAction representing a path. More... | |
static RenderAction | TextAction (Avalonia.Media.FormattedText text, IBrush fill, Avalonia.Matrix transform, Geometry clippingPath, string tag=null) |
Creates a new RenderAction representing text. More... | |
static RenderAction | ImageAction (string imageId, Avalonia.Rect sourceRect, Avalonia.Rect destinationRect, Avalonia.Matrix transform, Geometry clippingPath, string tag=null) |
Creates a new RenderAction representing an image. More... | |
Properties | |
ActionTypes | ActionType [get] |
Type of the rendering action. More... | |
Geometry | Geometry [get, set] |
Geometry that needs to be rendered (null if the action type is ActionTypes.Text). If you change this, you need to invalidate the Parent's visual. More... | |
Avalonia.Media.FormattedText | Text [get, set] |
Text that needs to be rendered (null if the action type is ActionTypes.Path). If you change this, you need to invalidate the Parent's visual. More... | |
Pen | Stroke [get, set] |
Rendering stroke (null if the action type is ActionTypes.Text or if the rendered action only has a Fill). If you change this, you need to invalidate the Parent's visual. More... | |
IBrush | Fill [get, set] |
Rendering fill (null if the rendered action only has a Stroke). If you change this, you need to invalidate the Parent's visual. More... | |
string | ImageId [get, set] |
Univocal identifier of the image that needs to be drawn. More... | |
Avalonia.? Rect | ImageSource [get, set] |
The source rectangle of the image. More... | |
Avalonia.? Rect | ImageDestination [get, set] |
The destination rectangle of the image. More... | |
Geometry | ClippingPath [get, set] |
The current clipping path. More... | |
Avalonia.Matrix | InverseTransform = Avalonia.Matrix.Identity [get] |
Inverse transformation matrix. More... | |
Avalonia.Matrix | Transform [get, set] |
Rendering transformation matrix. If you change this, you need to invalidate the Parent's visual. More... | |
string | Tag [get, set] |
A tag to access the RenderAction. More... | |
Avalonia.Controls.Canvas | Parent [get] |
The container of this RenderAction. More... | |
Events | |
EventHandler< Avalonia.Input.PointerEventArgs > | PointerEnter |
Raised when the pointer enters the area covered by the RenderAction. More... | |
EventHandler< Avalonia.Input.PointerEventArgs > | PointerLeave |
Raised when the pointer leaves the area covered by the RenderAction. More... | |
EventHandler< Avalonia.Input.PointerPressedEventArgs > | PointerPressed |
Raised when the pointer is pressed while over the area covered by the RenderAction. More... | |
EventHandler< Avalonia.Input.PointerReleasedEventArgs > | PointerReleased |
Raised when the pointer is released after a PointerPressed event. More... | |
Represents a light-weight rendering action.
Definition at line 1290 of file AvaloniaContext.cs.
|
strong |
Types of rendering actions.
Enumerator | |
---|---|
Path | The render action represents a path object. |
Text | The render action represents a text object. |
RasterImage | The render action represents a raster image. |
Definition at line 1295 of file AvaloniaContext.cs.
void VectSharp.Canvas.RenderAction.BringToFront | ( | ) |
Brings the render action to the front of the rendering queue. This method can only be invoked after the output has been fully initialised.
Definition at line 1516 of file AvaloniaContext.cs.
|
static |
Creates a new RenderAction representing an image.
imageId | The univocal identifier of the image to draw. |
sourceRect | The source rectangle of the image. |
destinationRect | The destination rectangle of the image. |
transform | The transform that will be applied to the image. |
clippingPath | The clipping path. |
tag | A tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test. |
Definition at line 1499 of file AvaloniaContext.cs.
|
static |
Creates a new RenderAction representing a path.
geometry | The geometry to be rendered. |
stroke | The stroke of the path (can be null). |
fill | The fill of the path (can be null). |
transform | The transform that will be applied to the path. |
clippingPath | The clipping path. |
tag | A tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test. |
Definition at line 1452 of file AvaloniaContext.cs.
void VectSharp.Canvas.RenderAction.SendToBack | ( | ) |
Brings the render action to the back of the rendering queue. This method can only be invoked after the output has been fully initialised.
Definition at line 1524 of file AvaloniaContext.cs.
|
static |
Creates a new RenderAction representing text.
text | The text to be rendered. |
fill | The fill of the text (can be null). |
transform | The transform that will be applied to the text. |
clippingPath | The clipping path. |
tag | A tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test. |
Definition at line 1475 of file AvaloniaContext.cs.
|
get |
Type of the rendering action.
Definition at line 1316 of file AvaloniaContext.cs.
|
getset |
The current clipping path.
Definition at line 1356 of file AvaloniaContext.cs.
|
getset |
Rendering fill (null if the rendered action only has a Stroke). If you change this, you need to invalidate the Parent's visual.
Definition at line 1336 of file AvaloniaContext.cs.
|
getset |
Geometry that needs to be rendered (null if the action type is ActionTypes.Text). If you change this, you need to invalidate the Parent's visual.
Definition at line 1321 of file AvaloniaContext.cs.
|
getset |
The destination rectangle of the image.
Definition at line 1351 of file AvaloniaContext.cs.
|
getset |
Univocal identifier of the image that needs to be drawn.
Definition at line 1341 of file AvaloniaContext.cs.
|
getset |
The source rectangle of the image.
Definition at line 1346 of file AvaloniaContext.cs.
|
get |
Inverse transformation matrix.
Definition at line 1363 of file AvaloniaContext.cs.
|
get |
The container of this RenderAction.
Definition at line 1388 of file AvaloniaContext.cs.
|
getset |
Rendering stroke (null if the action type is ActionTypes.Text or if the rendered action only has a Fill). If you change this, you need to invalidate the Parent's visual.
Definition at line 1331 of file AvaloniaContext.cs.
|
getset |
A tag to access the RenderAction.
Definition at line 1381 of file AvaloniaContext.cs.
|
getset |
Text that needs to be rendered (null if the action type is ActionTypes.Path). If you change this, you need to invalidate the Parent's visual.
Definition at line 1326 of file AvaloniaContext.cs.
|
getset |
Rendering transformation matrix. If you change this, you need to invalidate the Parent's visual.
Definition at line 1368 of file AvaloniaContext.cs.
EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.RenderAction.PointerEnter |
Raised when the pointer enters the area covered by the RenderAction.
Definition at line 1399 of file AvaloniaContext.cs.
EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.RenderAction.PointerLeave |
Raised when the pointer leaves the area covered by the RenderAction.
Definition at line 1404 of file AvaloniaContext.cs.
EventHandler<Avalonia.Input.PointerPressedEventArgs> VectSharp.Canvas.RenderAction.PointerPressed |
Raised when the pointer is pressed while over the area covered by the RenderAction.
Definition at line 1409 of file AvaloniaContext.cs.
EventHandler<Avalonia.Input.PointerReleasedEventArgs> VectSharp.Canvas.RenderAction.PointerReleased |
Raised when the pointer is released after a PointerPressed event.
Definition at line 1414 of file AvaloniaContext.cs.