Hello
How do I create full-color fills/hatchs on polylines?
How do I create full-color fills/hatchs on polylines?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: How do I create full-color fills/hatchs on polylines?
Code: Select all
// doc is your RDocument
// di is your RDocumentInterface
var data = new RHatchData(solid, scale, angle, patternName);
data.setDocument(doc);
data.newLoop();
data.addBoundary(polyline);
...
var hatch = new RHatchEntity(doc, data);
var op = new RAddObjectOperation(hatch);
di.applyOperation(op);