Geometry Class

Summary

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

Syntax

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

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
BeginBatchUpdate() void
Inherited from AvaloniaObject
Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
Bind<T>(StyledPropertyBase<T>, IObservable<BindingValue<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
ClearValue<T>(AvaloniaProperty<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
ClearValue<T>(DirectPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
ClearValue<T>(StyledPropertyBase<T>) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
Clone() Geometry
Clones the geometry.
CoerceValue<T>(StyledPropertyBase<T>) void
Coerces the specified AvaloniaProperty.
Inherited from AvaloniaObject
CreateDefiningGeometry() IGeometryImpl
Creates the platform implementation of the geometry, without the transform applied.
EndBatchUpdate() void
Inherited from AvaloniaObject
Equals(object) bool
Compares two objects using reference equality.
Inherited from AvaloniaObject
FillContains(Point) bool
Indicates whether the geometry's fill contains the specified point.
GetBaseValue<T>(StyledPropertyBase<T>, BindingPriority) Optional<T>
Gets an AvaloniaProperty base value.
Inherited from AvaloniaObject
GetHashCode() int
Gets the hash code for the object.
Inherited from AvaloniaObject
GetRenderBounds(IPen) Rect
Gets the geometry's bounding rectangle with the specified pen.
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(DirectPropertyBase<T>) T
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(StyledPropertyBase<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
Parse(string) Geometry
Creates a Geometry from a string.
static
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(DirectPropertyBase<T>, T) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(StyledPropertyBase<T>, T, BindingPriority) IDisposable
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
StrokeContains(IPen, Point) bool
Indicates whether the geometry's stroke contains the specified point.
VerifyAccess() void
Inherited from AvaloniaObject

Extension Methods

Name Value Summary
Bind(AvaloniaProperty, IObservable<BindingValue<object>>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Bind<T>(AvaloniaProperty<T>, IObservable<BindingValue<T>>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
GetBindingObservable(AvaloniaProperty) IObservable<BindingValue<object>>
Gets an observable for a AvaloniaProperty.
GetBindingObservable<T>(AvaloniaProperty<T>) IObservable<BindingValue<T>>
Gets an observable for a AvaloniaProperty.
GetBindingSubject(AvaloniaProperty, BindingPriority) ISubject<BindingValue<object>>
Gets a subject for a AvaloniaProperty.
GetBindingSubject<T>(AvaloniaProperty<T>, BindingPriority) ISubject<BindingValue<T>>
Gets a subject for a AvaloniaProperty.
GetDiagnostic(AvaloniaProperty) AvaloniaPropertyValue
Gets a diagnostic for a AvaloniaProperty on a AvaloniaObject.
GetObservable(AvaloniaProperty) IObservable<object>
Gets an observable for a AvaloniaProperty.
GetObservable<T>(AvaloniaProperty<T>) IObservable<T>
Gets an observable for a AvaloniaProperty.
GetPropertyChangedObservable(AvaloniaProperty) IObservable<AvaloniaPropertyChangedEventArgs>
Gets an observable that listens for property changed events for an AvaloniaProperty.
GetSubject(AvaloniaProperty, BindingPriority) ISubject<object>
Gets a subject for a AvaloniaProperty.
GetSubject<T>(AvaloniaProperty<T>, BindingPriority) ISubject<T>
Gets a subject for a AvaloniaProperty.