TextShape HatchPatternList
Gets the associated Hatch pattern list for the shape.
public IEnumerable<HatchPattern> HatchPatternList {get} |
Return value
HatchPattern | The associated Hatch pattern |
Example
Copy
DistanceUnit drillUnits = DistanceUnit.Millimeters;
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", drillUnits);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
TextShape textShape = new TextShape();
textShape.AddText("Sample text Sample text", "Arial", FontStyle.Regular, 10f, 1f);
textShape.TextBoxHeight = 20;
textShape.TextBoxWidth = 60;
textShape.DotDurationMicroseconds = 2;
textShape.Angle = 30;
textShape.ItalicAngle = 1.1f;
textShape.HorizontalAlign = TextHorizontalAlign.Left;
textShape.VerticalAlign = TextVerticalAlign.Center;
textShape.WordWrap = true;
textShape.LineSpaceStyle = TextLineSpaceStyle.Factor;
textShape.LineSpace = 1f;
textShape.AddHatchPatternLine(0.2f, HatchLineBorderGapDirection.Inward, 0.12f, 0, 0, 0, HatchLineStyle.Unidirectional, true,
HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.SmoothWithArcs);
textShape.AddHatchPatternHelixFilling(0.2f, HelixStyle.InwardToOut, HatchOffsetAlgorithm.DirectOffset,
HatchCornerStyle.SmoothWithArcs);
textShape.AddHatchPatternOffsetFilling(0.2f, HatchOffsetStyle.InwardToOut, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);
textShape.AddHatchPatternOffsetInOut(0.2f, 5, 0.2f, 5, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);
int i = textShape.HatchPatternList.Count();
textShape.ClearHatchPatterns();
textShape.AddHatchPatternLine(0.2f, HatchLineBorderGapDirection.Outward, 0.12f, 0, 0, 0, HatchLineStyle.Unidirectional, true,
HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.SmoothWithArcs);
vectorImage.AddText(textShape);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}