TextShape AddHatchPatternLine
Adds a Line type pattern to the shape
| public void AddHatchPatternLine(float borderGap, HatchLineBorderGapDirection borderGapDirection, float lineGap, float lineAngle, float baseX, float baseY, HatchLineStyle hatchStyle, bool withOffset, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle) |
Return value
| void |
Parameters
| float | borderGap | The distance between the Hatch boundary and the Object boundary |
| float | lineGap | The spacing between the hatching lines |
| float | lineAngle | The angle (radians) of the hatching lines |
| float | baseX | Set a special x point through which at least one hatch line will be passed |
| float | baseY | Set a special y point through which at least one hatch line will be passed |
| bool | withOffset | Offset the object boundary if a border gap has defined |
| HatchLineBorderGapDirection | borderGapDirection | Set the border gap direction |
| HatchLineStyle | hatchStyle | Set the hatching style |
| HatchOffsetAlgorithm | algorithm | Set the hatching algorithm |
| HatchCornerStyle | cornerStyle | Set the corner style |
Example
Copy
TextShape textShape = new TextShape();
textShape.AddText("Sample text", "Arial", FontStyle.Regular, 10f, 1f);
textShape.TextBoxHeight = 20;
textShape.TextBoxWidth = 60;
textShape.DotDurationMicroseconds = 2;
textShape.HorizontalAlign = TextHorizontalAlign.Left;
textShape.VerticalAlign = TextVerticalAlign.Center;
textShape.WordWrap = true;
textShape.LineSpaceStyle = TextLineSpaceStyle.Factor;
textShape.LineSpace = 1f;
textShape.AddHatchPatternLine(0.125f, HatchLineBorderGapDirection.Inward, .1f, 1.57079f, 0, 0,
HatchLineStyle.Unidirectional, true, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.SmoothWithLines);
vectorImage.AddText(textShape);