VectSharp 2.6.1
A light library for C# vector graphics
|
Represents a light-weight rendering action. More...
Public Types | |
enum | ActionTypes |
Types of rendering actions. More... | |
Public Member Functions | |
void | InvalidateHitTestPath () |
void | InvalidateVisual () |
void | InvalidateZIndex () |
void | InvalidateAll () |
void | Dispose () |
Static Public Member Functions | |
static SKRenderAction | PathAction (SKPath path, SKPaint paint, string tag=null) |
Creates a new SKRenderAction representing a path. More... | |
static SKRenderAction | ClipAction (SKPath clippingPath, string tag=null) |
Creates a new SKRenderAction representing a clipping action. More... | |
static SKRenderAction | TextAction (string text, float x, float y, SKFont font, SKPaint paint, string tag=null) |
Creates a new SKRenderAction representing text. More... | |
static SKRenderAction | ImageAction (string imageId, SKRect sourceRect, SKRect destinationRect, string tag=null) |
Creates a new SKRenderAction representing an image. More... | |
static SKRenderAction | TransformAction (SKMatrix transform, string tag=null) |
Creates a new SKRenderAction representing a transform. More... | |
static SKRenderAction | SaveAction (string tag=null) |
Creates a new SKRenderAction that saves the current graphics state. More... | |
static SKRenderAction | RestoreAction (string tag=null) |
Creates a new SKRenderAction that saves the current graphics state. More... | |
static SKRenderAction | DrawFilteredGraphicsAction (SKRenderContext graphics, IFilter filter, string tag=null) |
Create a new SKRenderAction that draws some graphics with a filter. More... | |
Properties | |
bool | Disposed [get] |
Returns a boolean value indicating whether the current instance has been disposed. More... | |
ActionTypes | ActionType [get] |
Type of the rendering action. More... | |
SKPath | Path [get, set] |
Path that needs to be rendered (null if the action type is not ActionTypes.Path). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
string | Text [get, set] |
Text that needs to be rendered (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
SKFont | Font [get, set] |
The font that will be used to render the text (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
float | TextX [get, set] |
The X coordainate at which the text will be drawn (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
float | TextY [get, set] |
The Y coordainate at which the text will be drawn (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
SKPaint | Paint [get, set] |
Paint used to render the text or path (null if the action type is neither ActionTypes.Text nor ActionTypes.Path). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
string | ImageId [get, set] |
Univocal identifier of the image that needs to be drawn. More... | |
SKRect? | ImageSource [get, set] |
The source rectangle of the image (null if the action type is not ActionTypes.RasterImage). If you change this, you probably want to call this object's InvalidateVisual method. More... | |
SKRect? | ImageDestination [get, set] |
The destination rectangle of the image (null if the action type is not ActionTypes.RasterImage). If you change this, you probably want to call this object's InvalidateHitTestPath method. More... | |
SKMatrix? | Transform = null [get, set] |
The transformation matrix that will be applied to the current coordinate system (null if the action type is not ActionTypes.Transform). If you change this, you probably want to call this object's InvalidateVisual method. More... | |
string | Tag [get] |
A tag to access the SKRenderAction. More... | |
uint | ZIndex = 0 [get, set] |
The Z-index of the rendering action (an action with a higher Z-index will always appear above an action with a lower Z-index). The more different values there are for the Z-index, the slower the rendering, so keep use of this property to a minimum. If you change this, you probably want to call this object's InvalidateZIndex method. More... | |
SKRenderContext | Graphics = null [get, set] |
The graphics that will be drawn with the specified Filter. If you change this, you probably want to call this object's InvalidateVisual method. More... | |
IFilter | Filter [get, set] |
The filter with which the Graphics is drawn. If you change this, you probably want to call this object's InvalidateVisual method. More... | |
object | Payload [get, set] |
An arbitrary object associated with the RenderAction. More... | |
Avalonia.Controls.Canvas | Parent [get] |
The container of this SKRenderAction. More... | |
Events | |
EventHandler< Avalonia.Input.PointerEventArgs > | PointerEntered |
Raised when the pointer enters the area covered by the SKRenderAction. More... | |
EventHandler< Avalonia.Input.PointerEventArgs > | PointerExited |
Raised when the pointer leaves the area covered by the SKRenderAction. More... | |
EventHandler< Avalonia.Input.PointerPressedEventArgs > | PointerPressed |
Raised when the pointer is pressed while over the area covered by the SKRenderAction. 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 30 of file SKRenderContext.cs.
Types of rendering actions.
Definition at line 42 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction representing a clipping action.
clippingPath | The path to be used for clipping. |
tag | A tag to access the SKRenderAction. |
Definition at line 345 of file SKRenderContext.cs.
void VectSharp.Canvas.SKRenderAction.Dispose | ( | ) |
Definition at line 494 of file SKRenderContext.cs.
|
static |
Create a new SKRenderAction that draws some graphics with a filter.
Definition at line 464 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction 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. |
tag | A tag to access the SKRenderAction. If this is null this SKRenderAction is not visible in the hit test. |
Definition at line 397 of file SKRenderContext.cs.
void VectSharp.Canvas.SKRenderAction.InvalidateAll | ( | ) |
This methods signals to the Parent that the Z-index, shape and visual properties (e.g. the colour) of this object have changed and triggers a redraw.
If you make changes to more than one SKRenderAction contained in the same Canvas, you only need to invalidate the last one.
This method should only be called after the output has been fully initialized.
Definition at line 303 of file SKRenderContext.cs.
void VectSharp.Canvas.SKRenderAction.InvalidateHitTestPath | ( | ) |
Signals to this object that its shape has changed and a new path needs to be computed for the purpose of hit-testing. Also signals to the Parent that the visual properties of this object have changed and triggers a redraw.
This method should be called whenever the "shape" of the object represented by the SKRenderAction changes. If only the visual properties of this object have changed (e.g. the colour), call the InvalidateVisual method instead.
If you make changes to more than one SKRenderAction contained in the same SKMultiLayerRenderCanvas, you only need to invalidate the last one.
This method should only be called after the output has been fully initialized.
Definition at line 232 of file SKRenderContext.cs.
void VectSharp.Canvas.SKRenderAction.InvalidateVisual | ( | ) |
This methods signals to the Parent that the visual properties (e.g. the colour) of this object have changed and triggers a redraw.
If the "shape" of the object has changed as well, call the InvalidateHitTestPath method instead. If the Z-index of the object has changed, call the InvalidateZIndex method instead. If both the "shape" and the Z-index of the object have changed, call the InvalidateAll method.
If you make changes to more than one SKRenderAction contained in the same Canvas, you only need to invalidate the last one.
This method should only be called after the output has been fully initialized.
Definition at line 282 of file SKRenderContext.cs.
void VectSharp.Canvas.SKRenderAction.InvalidateZIndex | ( | ) |
This methods signals to the Parent that the Z-index and visual properties (e.g. the colour) of this object have changed and triggers a redraw.
If the "shape" of the object has changed as well, call the InvalidateAll method instead.
If you make changes to more than one SKRenderAction contained in the same Canvas, you only need to invalidate the last one.
This method should only be called after the output has been fully initialized.
Definition at line 293 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction representing a path.
path | The geometry to be rendered. |
paint | The paint used to fill or stroke the path. |
tag | A tag to access the SKRenderAction. If this is null this SKRenderAction is not visible in the hit test. |
Definition at line 321 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction that saves the current graphics state.
tag | A tag to access the SKRenderAction. |
Definition at line 451 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction that saves the current graphics state.
tag | A tag to access the SKRenderAction. |
Definition at line 437 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction representing text.
text | The text to be rendered. |
x | The X coordinate at which the text will be drawn. |
y | The Y coordinate at which the text will be drawn. |
font | The font to be used to render the text. |
paint | The paint to be used to fill or stroke the text. |
tag | A tag to access the SKRenderAction. If this is null this SKRenderAction is not visible in the hit test. |
Definition at line 365 of file SKRenderContext.cs.
|
static |
Creates a new SKRenderAction representing a transform.
transform | The transform to apply. |
tag | A tag to access the SKRenderAction. |
Definition at line 422 of file SKRenderContext.cs.
|
get |
Type of the rendering action.
Definition at line 88 of file SKRenderContext.cs.
|
get |
Returns a boolean value indicating whether the current instance has been disposed.
Definition at line 35 of file SKRenderContext.cs.
|
getset |
The filter with which the Graphics is drawn. If you change this, you probably want to call this object's InvalidateVisual method.
Definition at line 163 of file SKRenderContext.cs.
|
getset |
The font that will be used to render the text (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 106 of file SKRenderContext.cs.
|
getset |
The graphics that will be drawn with the specified Filter. If you change this, you probably want to call this object's InvalidateVisual method.
Definition at line 158 of file SKRenderContext.cs.
|
getset |
The destination rectangle of the image (null
if the action type is not ActionTypes.RasterImage). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 136 of file SKRenderContext.cs.
|
getset |
Univocal identifier of the image that needs to be drawn.
Definition at line 126 of file SKRenderContext.cs.
|
getset |
The source rectangle of the image (null
if the action type is not ActionTypes.RasterImage). If you change this, you probably want to call this object's InvalidateVisual method.
Definition at line 131 of file SKRenderContext.cs.
|
getset |
Paint used to render the text or path (null
if the action type is neither ActionTypes.Text nor ActionTypes.Path). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 121 of file SKRenderContext.cs.
|
get |
The container of this SKRenderAction.
Definition at line 175 of file SKRenderContext.cs.
|
getset |
Path that needs to be rendered (null if the action type is not ActionTypes.Path). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 93 of file SKRenderContext.cs.
|
getset |
An arbitrary object associated with the RenderAction.
Definition at line 168 of file SKRenderContext.cs.
|
get |
A tag to access the SKRenderAction.
Definition at line 146 of file SKRenderContext.cs.
|
getset |
Text that needs to be rendered (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 101 of file SKRenderContext.cs.
|
getset |
The X coordainate at which the text will be drawn (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 111 of file SKRenderContext.cs.
|
getset |
The Y coordainate at which the text will be drawn (null if the action type is not ActionTypes.Text). If you change this, you probably want to call this object's InvalidateHitTestPath method.
Definition at line 116 of file SKRenderContext.cs.
|
getset |
The transformation matrix that will be applied to the current coordinate system (null
if the action type is not ActionTypes.Transform). If you change this, you probably want to call this object's InvalidateVisual method.
Definition at line 141 of file SKRenderContext.cs.
|
getset |
The Z-index of the rendering action (an action with a higher Z-index will always appear above an action with a lower Z-index). The more different values there are for the Z-index, the slower the rendering, so keep use of this property to a minimum. If you change this, you probably want to call this object's InvalidateZIndex method.
Definition at line 153 of file SKRenderContext.cs.
EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.SKRenderAction.PointerEntered |
Raised when the pointer enters the area covered by the SKRenderAction.
Definition at line 186 of file SKRenderContext.cs.
EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.SKRenderAction.PointerExited |
Raised when the pointer leaves the area covered by the SKRenderAction.
Definition at line 191 of file SKRenderContext.cs.
EventHandler<Avalonia.Input.PointerPressedEventArgs> VectSharp.Canvas.SKRenderAction.PointerPressed |
Raised when the pointer is pressed while over the area covered by the SKRenderAction.
Definition at line 196 of file SKRenderContext.cs.
EventHandler<Avalonia.Input.PointerReleasedEventArgs> VectSharp.Canvas.SKRenderAction.PointerReleased |
Raised when the pointer is released after a PointerPressed event.
Definition at line 201 of file SKRenderContext.cs.