Geometry Class

Summary

Defines a geometric shape.
graph TD Base0["AvaloniaObject"]-->Type click Base0 "/api/Avalonia/AvaloniaObject" Base1["object"]-->Base0 Interface0["IAvaloniaObject"]-.->Type click Interface0 "/api/Avalonia/IAvaloniaObject" Interface1["IAvaloniaObjectDebug"]-.->Type click Interface1 "/api/Avalonia.Diagnostics/IAvaloniaObjectDebug" Interface2["INotifyPropertyChanged"]-.->Type Type["Geometry"] class Type type-node Type-->Derived0["PolylineGeometry"] click Derived0 "/api/Avalonia.Media/PolylineGeometry" Type-->Derived1["EllipseGeometry"] click Derived1 "/api/Avalonia.Media/EllipseGeometry" Type-->Derived2["RectangleGeometry"] click Derived2 "/api/Avalonia.Media/RectangleGeometry" Type-->Derived3["LineGeometry"] click Derived3 "/api/Avalonia.Media/LineGeometry" Type-->Derived4["StreamGeometry"] click Derived4 "/api/Avalonia.Media/StreamGeometry"

Syntax

public abstract class Geometry : AvaloniaObject, IAvaloniaObject, IAvaloniaObjectDebug, 
    INotifyPropertyChanged

Events

Name Type Summary
Changed EventHandler
Raised when the geometry changes.
PropertyChanged EventHandler<AvaloniaPropertyChangedEventArgs>
Raised when a AvaloniaProperty value changes on this object.
Inherited from AvaloniaObject

Fields

Name Constant Value Summary
TransformProperty
Defines the Transform property.
static

Properties

Name Value Summary
Bounds Rect
Gets the geometry's bounding rectangle.
InheritanceParent IAvaloniaObject
Gets or sets the parent object that inherited AvaloniaProperty values are inherited from.
Inherited from AvaloniaObject
PlatformImpl IGeometryImpl
Gets the platform-specific implementation of the geometry.
this[AvaloniaProperty] object
Gets or sets the value of a AvaloniaProperty.
Inherited from AvaloniaObject
this[IndexerDescriptor] IBinding
Gets or sets a binding for a AvaloniaProperty.
Inherited from AvaloniaObject
Transform Transform
Gets or sets a transform to apply to the geometry.

Methods

Name Value Summary
AffectsGeometry(AvaloniaProperty[]) void
Marks a property as affecting the geometry's PlatformImpl.
static
AffectsValidation(AvaloniaProperty, AvaloniaProperty[]) void
Forces revalidation of properties when a property value changes.
Inherited from AvaloniaObject
static
Bind(AvaloniaProperty, IObservable<object>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
Bind<T>(AvaloniaProperty<T>, IObservable<T>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
CheckAccess() bool
Inherited from AvaloniaObject
ClearValue(AvaloniaProperty) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
Clone() Geometry
Clones the geometry.
CreateDefiningGeometry() IGeometryImpl
Creates the platform implementation of the geometry, without the transform applied.
FillContains(Point) bool
Indicates whether the geometry's fill contains the specified point.
GetRenderBounds(Pen) Rect
Gets the geometry's bounding rectangle with the specified pen.
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(AvaloniaProperty<T>) T
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
InvalidateGeometry() void
Invalidates the platform implementation of the geometry.
IsAnimating(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is animating.
Inherited from AvaloniaObject
IsSet(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is set on this object.
Inherited from AvaloniaObject
OnPropertyChanged(AvaloniaPropertyChangedEventArgs) void
Called when a avalonia property changes on the object.
Inherited from AvaloniaObject
Parse(string) Geometry
Creates a Geometry from a string.
static
RaisePropertyChanged(AvaloniaProperty, object, object, BindingPriority) void
Raises the PropertyChanged event.
Inherited from AvaloniaObject
Revalidate(AvaloniaProperty) void
Forces the specified property to be revalidated.
Inherited from AvaloniaObject
SetAndRaise<T>(AvaloniaProperty<T>, T, AvaloniaObject.SetAndRaiseCallback<T>, T) bool
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
Inherited from AvaloniaObject
SetAndRaise<T>(AvaloniaProperty<T>, T, T) bool
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
Inherited from AvaloniaObject
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(AvaloniaProperty<T>, T, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
StrokeContains(Pen, Point) bool
Indicates whether the geometry's stroke contains the specified point.
UpdateDataValidation(AvaloniaProperty, BindingNotification) void
Called to update the validation state for properties for which data validation is enabled.
Inherited from AvaloniaObject
VerifyAccess() void
Inherited from AvaloniaObject

Extension Methods