Freigeben über


ArcSegment Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents an elliptical arc between two points.

Inheritance Hierarchy

System.Object
  System.Windows.DependencyObject
    System.Windows.Media.PathSegment
      System.Windows.Media.ArcSegment

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public NotInheritable Class ArcSegment _
    Inherits PathSegment
public sealed class ArcSegment : PathSegment
<ArcSegment .../>

The ArcSegment type exposes the following members.

Constructors

  Name Description
Public methodSupported by Silverlight for Windows Phone ArcSegment Initializes a new instance of the ArcSegment class.

Top

Properties

  Name Description
Public propertySupported by Silverlight for Windows Phone Dispatcher Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
Public propertySupported by Silverlight for Windows Phone IsLargeArc Gets or sets a value that indicates whether the arc should be greater than 180 degrees.
Public propertySupported by Silverlight for Windows Phone Point Gets or sets the endpoint of the elliptical arc.
Public propertySupported by Silverlight for Windows Phone RotationAngle Gets or sets the amount (in degrees) by which the ellipse is rotated about the x-axis.
Public propertySupported by Silverlight for Windows Phone Size Gets or sets the x- and y-radius of the arc as a Size structure.
Public propertySupported by Silverlight for Windows Phone SweepDirection Gets or sets a value that specifies whether the arc is drawn in the Clockwise or Counterclockwise direction.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows Phone CheckAccess Determines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows Phone ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows Phone Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows Phone Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetAnimationBaseValue Returns any base value established for a Silverlight dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows Phone GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Protected methodSupported by Silverlight for Windows Phone MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows Phone SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows Phone ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic memberSupported by Silverlight for Windows Phone IsLargeArcProperty Identifies the IsLargeArc dependency property.
Public fieldStatic memberSupported by Silverlight for Windows Phone PointProperty Identifies the Point dependency property.
Public fieldStatic memberSupported by Silverlight for Windows Phone RotationAngleProperty Identifies the RotationAngle dependency property.
Public fieldStatic memberSupported by Silverlight for Windows Phone SizeProperty Identifies the Size dependency property.
Public fieldStatic memberSupported by Silverlight for Windows Phone SweepDirectionProperty Identifies the SweepDirection dependency property.

Top

Remarks

Use a PathFigure object to store ArcSegment objects and other segments.

An elliptical arc is defined by its start and end points, x- and y-radius, x-axis rotation factor, a value indicating whether the arc should be greater than 180 degrees, and a value describing the direction in which the arc is drawn. The ArcSegment class does not contain a property for the starting point of the arc; it only defines the destination point of the arc it represents. The beginning point of the arc is the current point of the PathFigure to which the ArcSegment is added.

The following illustrations demonstrate the different end point, Size, and RotationAngle settings.

ArcSegments with different Point settingsArcSegments with different Size settingsArcSegments with different RotationAngle settings

IsLargeArc and SweepDirection

For most arcs of a particular position, size, and rotation, there are four different arcs that can be drawn; the IsLargeArc and SweepDirection properties indicate which arc to use.

Of the four candidate arc sweeps, two represent large arcs with sweeps of 180 degrees or greater, and two represent smaller arcs with sweeps 180 degrees or less. If IsLargeArc is true, then one of the two larger arc sweeps is chosen; otherwise, if IsLargeArc is false, one of the smaller arc sweeps is chosen. The remaining two arc candidates are each drawn in a different direction: Counterclockwise or Clockwise. The SweepDirection property specifies which one to use.

The following illustrations show different IsLargeArc and SweepDirection settings.

ArcSegment objects with different IsLargeArc settings

ArcSegments with different IsLargeArc settings

ArcSegment objects with different SweepDirection settings

ArcSegments with different SweepDirection settings

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.