StrokedSegmentTParam, TPoint Class |
Namespace: DigitalRune.Graphics
The StrokedSegmentTParam, TPoint type exposes the following members.
Name | Description | |
---|---|---|
StrokedSegmentTParam, TPoint(ICurveTParam, TPoint) |
Initializes a new instance of the StrokedSegmentTParam, TPoint class with the
specified stroked curve.
| |
StrokedSegmentTParam, TPoint(ICurveTParam, TPoint, Boolean) |
Initializes a new instance of the StrokedSegmentTParam, TPoint 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.
| |
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].
| |
GetPoint |
Computes a point on the curve.
| |
GetTangent |
Computes the tangent for a point on the curve.
| |
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.
| |
IsStroked |
Gets or sets a value indicating whether this curve segment is stroked.
|
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) };