NoesisGUI

StreamGeometry Class

Defines a geometric shape, described using a StreamGeometryContext or a SVG command string as described in the W3C specs.

var geometry = new StreamGeometry();

using (var context = geometry.Open())
{
    context.BeginFigure(new Point(100.0f, 100.0f), true);
    context.LineTo(new Point(200.0f, 100.0f));
    context.LineTo(new Point(200.0f, 200.0f));
}
var geometry = new StreamGeometry();
geometry.SetData("M 100, 100 L 200, 100 200, 200 Z");
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <Path Fill="#FFF2F000" Data="M 100, 100 L 200, 100 200, 200 Z"/>
</Canvas>

http://msdn.microsoft.com/en-us/library/system.windows.media.streamgeometry.aspx

Inheritance Hierarchy

StreamGeometry

INDEX Class Hierarchy Index

Methods

From StreamGeometry

Name Description
Open Constructs a stream geometry specifying drawing commands
SetData

Rebuild the geometry with a new set of SVG path commands

Example:

M 100, 100 L 200, 100 200, 200 Z
TryParse Constructs a StreamGeometry from SVG path commands

From Geometry

Name Description
FillContains Indicates whether the geometry contains the specified Point
GetRenderBounds Returns an axis-aligned rectangle that is exactly large enough to contain the geometry after it has been outlined with the specified Pen
IsEmpty Determines whether the object is empty
StrokeContains Determines whether the specified Point is contained in the stroke produced by applying the specified Pen to the geometry
TryParse Creates a new Geometry instance from the specified string

From Freezable

Name Description
CanFreeze Gets a value that indicates whether the object can be made unmodifiable.
CanSeal Indicates if the current instance can be sealed
Clone Creates a modifiable clone of the Freezable, making deep copies of the object's values. When copying the object's dependency properties, this method copies expressions (which might no longer resolve) but not animations or their current values. The cloned Freezable::IsFrozen property is false even if the source's IsFrozen property is true.
CloneCurrentValue Creates a modifiable clone (deep copy) of the Freezable using its current values. The cloned object's IsFrozen property is false even if the source's IsFrozen property is true.
Freeze Makes the current object unmodifiable and sets its IsFrozen property to true.
GetAsFrozen Creates a frozen copy of the Freezable, using base (non-animated) property values. Because the copy is frozen, any frozen sub-objects are copied by reference. The copy's IsFrozen property is set to true. Throws if the Freezable cannot be frozen because it contains expressions or animated properties.
GetCurrentValueAsFrozen Creates a frozen copy of the Freezable using current property values. Because the copy is frozen, any frozen sub-objects are copied by reference. The copy's IsFrozen property is set to true.
IsFrozen Gets a value that indicates whether the object is currently modifiable.
IsSealed Indicates if the current instance is sealed
Seal Seals the current instance

From DependencyObject

Name Description
ClearAnimation Clears the animation value of a property
ClearAnimation Clears the animation value of a property
ClearLocalValue Clears the local value of a property The property to be cleared is specified by a DependencyProperty identifier
CoerceValue Coerces and validates the effective property value
CoerceValue Coerces and validates the effective property value
DependencyPropertyChanged Returns the PropertyChanged event
Destroyed Destroyed delegate is raised when object is going to be destroyed
GetBaseValue Returns the base value without animation nor coerce (this never returns IExpression like GetLocalValue)
GetLocalValue Returns the local value of a dependency property, if it exists.
GetValue Returns the current effective value of a dependency property on this instance of a DependencyObject
GetValueObject Returns the current effective value of a dependency property on this instance of a DependencyObject as a boxed value
GetValueProvider Gets the provider that returns the effective value for the specified dependency property
HasAnimatedProperties Returns true if there is any animated property
InvalidateProperty Re-evaluates the effective value for the specified dependency property if necessary If null is passed, a full re-evaluation could be needed
IsCached Returns if the value is stored in the cache. If true, the priority is returned in the provider field
SetAnimation Sets the animated value of a property
SetCurrentValue Sets the current value of a dependency property. The current value is set on the coerce field, without modifying source or animated value
SetCurrentValueObject Sets the current value of a dependency property using a boxed value
SetExpression Sets the expression to be evaluated dynamically to obtain the value of the property
SetValue Sets the local value of a dependency property
SetValueObject Sets the local value (boxed) of a dependency property

Properties

From StreamGeometry


Name Description
DP FillRule Gets or sets a value that determines how the intersecting areas contained in this StreamGeometry are combined
DP_ Dependency Property - RO_ Read only

From Geometry


Name Description
RO Bounds Gets geometry bounds
DP Transform Gets or sets the Transform object applied to a Geometry
DP_ Dependency Property - RO_ Read only

Events

StreamGeometry has no events

© 2017 Noesis Technologies