VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.Canvas.RenderAction Class Reference

Represents a light-weight rendering action. More...

Public Types

enum  ActionTypes
 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, Avalonia.Media.TextFormatting.TextLayout layout, 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 and you should also change the Layout property. More...
 
Avalonia.Media.TextFormatting.TextLayout Layout [get, set]
 Text layout, used for hit testing (null if the action type is ActionTypes.Path). If you change this, you need to invalidate the Parent's visual and you should also change the Text property. 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...
 
Control Parent [get]
 The container of this RenderAction. More...
 

Events

EventHandler< Avalonia.Input.PointerEventArgs > PointerEntered
 Raised when the pointer enters the area covered by the RenderAction. More...
 
EventHandler< Avalonia.Input.PointerEventArgs > PointerExited
 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...
 

Detailed Description

Represents a light-weight rendering action.

Definition at line 1354 of file AvaloniaContext.cs.

Member Enumeration Documentation

◆ ActionTypes

Types of rendering actions.

Definition at line 1359 of file AvaloniaContext.cs.

Member Function Documentation

◆ BringToFront()

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 1607 of file AvaloniaContext.cs.

◆ ImageAction()

static RenderAction VectSharp.Canvas.RenderAction.ImageAction ( string  imageId,
Avalonia.Rect  sourceRect,
Avalonia.Rect  destinationRect,
Avalonia.Matrix  transform,
Geometry  clippingPath,
string  tag = null 
)
static

Creates a new RenderAction representing an image.

Parameters
imageIdThe univocal identifier of the image to draw.
sourceRectThe source rectangle of the image.
destinationRectThe destination rectangle of the image.
transformThe transform that will be applied to the image.
clippingPathThe clipping path.
tagA tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test.
Returns
A new RenderAction representing an image.

Definition at line 1590 of file AvaloniaContext.cs.

◆ PathAction()

static RenderAction VectSharp.Canvas.RenderAction.PathAction ( Geometry  geometry,
Pen  stroke,
IBrush  fill,
Avalonia.Matrix  transform,
Geometry  clippingPath,
string  tag = null 
)
static

Creates a new RenderAction representing a path.

Parameters
geometryThe geometry to be rendered.
strokeThe stroke of the path (can be null).
fillThe fill of the path (can be null).
transformThe transform that will be applied to the path.
clippingPathThe clipping path.
tagA tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test.
Returns
A new RenderAction representing a path.

Definition at line 1541 of file AvaloniaContext.cs.

◆ SendToBack()

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 1615 of file AvaloniaContext.cs.

◆ TextAction()

static RenderAction VectSharp.Canvas.RenderAction.TextAction ( Avalonia.Media.FormattedText  text,
Avalonia.Media.TextFormatting.TextLayout  layout,
IBrush  fill,
Avalonia.Matrix  transform,
Geometry  clippingPath,
string  tag = null 
)
static

Creates a new RenderAction representing text.

Parameters
textThe text to be rendered.
layoutThe text layout used for hit testing.
fillThe fill of the text (can be null).
transformThe transform that will be applied to the text.
clippingPathThe clipping path.
tagA tag to access the RenderAction. If this is null this RenderAction is not visible in the hit test.
Returns
A new RenderAction representing text.

Definition at line 1565 of file AvaloniaContext.cs.

Property Documentation

◆ ActionType

ActionTypes VectSharp.Canvas.RenderAction.ActionType
get

Type of the rendering action.

Definition at line 1380 of file AvaloniaContext.cs.

◆ ClippingPath

Geometry VectSharp.Canvas.RenderAction.ClippingPath
getset

The current clipping path.

Definition at line 1445 of file AvaloniaContext.cs.

◆ Fill

IBrush VectSharp.Canvas.RenderAction.Fill
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 1410 of file AvaloniaContext.cs.

◆ Geometry

Geometry VectSharp.Canvas.RenderAction.Geometry
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 1385 of file AvaloniaContext.cs.

◆ ImageDestination

Avalonia.? Rect VectSharp.Canvas.RenderAction.ImageDestination
getset

The destination rectangle of the image.

Definition at line 1440 of file AvaloniaContext.cs.

◆ ImageId

string VectSharp.Canvas.RenderAction.ImageId
getset

Univocal identifier of the image that needs to be drawn.

Definition at line 1430 of file AvaloniaContext.cs.

◆ ImageSource

Avalonia.? Rect VectSharp.Canvas.RenderAction.ImageSource
getset

The source rectangle of the image.

Definition at line 1435 of file AvaloniaContext.cs.

◆ InverseTransform

Avalonia.Matrix VectSharp.Canvas.RenderAction.InverseTransform = Avalonia.Matrix.Identity
get

Inverse transformation matrix.

Definition at line 1452 of file AvaloniaContext.cs.

◆ Layout

Avalonia.Media.TextFormatting.TextLayout VectSharp.Canvas.RenderAction.Layout
getset

Text layout, used for hit testing (null if the action type is ActionTypes.Path). If you change this, you need to invalidate the Parent's visual and you should also change the Text property.

Definition at line 1397 of file AvaloniaContext.cs.

◆ Parent

Control VectSharp.Canvas.RenderAction.Parent
get

The container of this RenderAction.

Definition at line 1477 of file AvaloniaContext.cs.

◆ Stroke

Pen VectSharp.Canvas.RenderAction.Stroke
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 1402 of file AvaloniaContext.cs.

◆ Tag

string VectSharp.Canvas.RenderAction.Tag
getset

A tag to access the RenderAction.

Definition at line 1470 of file AvaloniaContext.cs.

◆ Text

Avalonia.Media.FormattedText VectSharp.Canvas.RenderAction.Text
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 and you should also change the Layout property.

Definition at line 1391 of file AvaloniaContext.cs.

◆ Transform

Avalonia.Matrix VectSharp.Canvas.RenderAction.Transform
getset

Rendering transformation matrix. If you change this, you need to invalidate the Parent's visual.

Definition at line 1457 of file AvaloniaContext.cs.

Event Documentation

◆ PointerEntered

EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.RenderAction.PointerEntered

Raised when the pointer enters the area covered by the RenderAction.

Definition at line 1488 of file AvaloniaContext.cs.

◆ PointerExited

EventHandler<Avalonia.Input.PointerEventArgs> VectSharp.Canvas.RenderAction.PointerExited

Raised when the pointer leaves the area covered by the RenderAction.

Definition at line 1493 of file AvaloniaContext.cs.

◆ PointerPressed

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 1498 of file AvaloniaContext.cs.

◆ PointerReleased

EventHandler<Avalonia.Input.PointerReleasedEventArgs> VectSharp.Canvas.RenderAction.PointerReleased

Raised when the pointer is released after a PointerPressed event.

Definition at line 1503 of file AvaloniaContext.cs.


The documentation for this class was generated from the following file: