StrokedSegment3F Class |
Namespace: DigitalRune.Graphics
The StrokedSegment3F type exposes the following members.
Name | Description | |
---|---|---|
StrokedSegment3F(ICurveSingle, Vector3F) |
Initializes a new instance of the StrokedSegment3F class with the specified
stroked curve.
| |
StrokedSegment3F(ICurveSingle, Vector3F, Boolean) |
Initializes a new instance of the StrokedSegment3F class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Flatten |
Computes the points of a sequence of line segments which approximate the curve.
(Inherited from StrokedSegmentTParam, TPoint.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLength |
Computes the approximated length of the curve for the parameter interval
[start, end].
(Inherited from StrokedSegmentTParam, TPoint.) | |
GetPoint |
Computes a point on the curve.
(Inherited from StrokedSegmentTParam, TPoint.) | |
GetTangent |
Computes the tangent for a point on the curve.
(Inherited from StrokedSegmentTParam, TPoint.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Curve |
Gets or sets the curve.
(Inherited from StrokedSegmentTParam, TPoint.) | |
IsStroked |
Gets or sets a value indicating whether this curve segment is stroked.
(Inherited from StrokedSegmentTParam, TPoint.) |
The following example creates rectangles where all or only some edges are stroked:
// Box where all edges are stroked. (Curve segments are stroked by default.) var boxFigure1 = new PathFigure2F { Segments = { new LineSegment2F { Point1 = new Vector2F(0, 0), Point2 = new Vector2F(0, 1) }, new LineSegment2F { Point1 = new Vector2F(0, 1), Point2 = new Vector2F(1, 1) }, new LineSegment2F { Point1 = new Vector2F(1, 1), Point2 = new Vector2F(1, 0) }, new LineSegment2F { Point1 = new Vector2F(1, 0), Point2 = new Vector2F(0, 0) } } }; var figureNode1 = new FigureNode(boxFigure1) { StrokeColor = new Vector3F(0, 0, 0), StrokeThickness = 2, FillColor = new Vector3F(0.5f, 0.5f, 0.5f) }; // Box where top and bottom edges are stroked. var boxFigure2 = new PathFigure2F { Segments = { new StrokedSegment2F( new LineSegment2F { Point1 = new Vector2F(0, 0), Point2 = new Vector2F(0, 1) }, false), new LineSegment2F { Point1 = new Vector2F(0, 1), Point2 = new Vector2F(1, 1) }, new StrokedSegment2F( new LineSegment2F { Point1 = new Vector2F(1, 1), Point2 = new Vector2F(1, 0) }, false), new LineSegment2F { Point1 = new Vector2F(1, 0), Point2 = new Vector2F(0, 0) } } }; var figureNode2 = new FigureNode(boxFigure2) { StrokeColor = new Vector3F(0, 0, 0), StrokeThickness = 2, FillColor = new Vector3F(0.5f, 0.5f, 0.5f) };