how do make a script to import a bitmap
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
how do make a script to import a bitmap
hi i am trying to import a bitmap image using the script shell so i a can make a script to import bitmaps automatically
Re: how do make a script to import a bitmap
Widow,
That would be in about the same way as with your other topic.
How did that work out?
See: Image.js
The operation is casted in line 210
The operation is constructed in Image.prototype.getOperation line 215-229
The object 'this.image' is declared in Image.prototype.beginEvent line 67-74
And also destroyed in line 92
Regards,
CVH
That would be in about the same way as with your other topic.
How did that work out?
See: Image.js
The operation is casted in line 210
The operation is constructed in Image.prototype.getOperation line 215-229
The object 'this.image' is declared in Image.prototype.beginEvent line 67-74
And also destroyed in line 92
Regards,
CVH
Re: how do make a script to import a bitmap
All the actual open resources you can be found on Github.
https://github.com/qcad/qcad/tree/maste ... Draw/Image
https://github.com/qcad/qcad/tree/maste ... Draw/Image
Last edited by CVH on Tue Apr 14, 2020 9:24 am, edited 1 time in total.
Re: how do make a script to import a bitmap
Try this self contained example (adjust path to desired absolute path):
Code: Select all
var document=getDocument();
var e = new RImageEntity(document, new RImageData("/path/to/image.png", new RVector(0,0), new RVector(1,0), new RVector(0,1), 50, 50, 0));
addEntity(e);