How do I create full-color fills/hatchs on polylines?

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

pietro_72_
Active Member
Posts: 30
Joined: Fri Apr 17, 2015 6:40 am
Location: http://pietro72li.altervista.org/

How do I create full-color fills/hatchs on polylines?

Postby pietro_72_ » Mon Jun 12, 2017 11:29 am

Hello

How do I create full-color fills/hatchs on polylines?

User avatar
andrew
Site Admin
Posts: 5318
Joined: Fri Mar 30, 2007 6:07 am

Re: How do I create full-color fills/hatchs on polylines?

Postby andrew » Mon Jun 12, 2017 12:07 pm

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);


Return to “QCAD Developers and Contributors”

Who is online

Users browsing this forum: No registered users and 3 guests