FlexPainter Painter and Painter generator

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

Post Reply
Premier Member
Posts: 763
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

FlexPainter Painter and Painter generator

Post by CVH » Fri Jan 03, 2020 12:19 am

From a fellow developer:
pietro_72_ wrote:
Thu Jan 02, 2020 11:33 pm
I thought, if possible, that I could make sure that your FlexPainter program allows users to create arbitrary forms to follow path
I get what you mean by that.
I am very aware that that would be a nice side add-on.
Doing everything to leave that path open.

Well, the coding of a painter is no rocket science. 8)
But I am not so sure that one can leave the human intellect aside. :?

While it is already included in the latest Qcad releases it is accompanied with a tutorial.
You may find how the rope is coded in :

While painters are still hardcoded you can find them in FlexPainter.js itself :
section: FlexPainter.prototype.PainterSetInit
Painter data types are explained at the top. e_geek

To be included in the dialog list a painter has also an entry here :
section: FlexPainter.prototype.initWidgetsCombo e_geek

And is further accompanied by a preview icon in the icon folder.
A Painter is coded a lot faster then that a proper icon is made. :(
I got several new Painters without a preview still .... work in progress.
If the icon isn't present you get a blank preview, not an error state.

I don't exclude a Painter generator at this moment.
But I am not saying it would be a straight forward task.

Step by step, the next focus is on separating the Painters into individual files.
Don't want some, then leave them out
Add any custom one

QCADpro / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

Post Reply

Return to “QCAD Developers and Contributors”