I would like to develop a plugin to fit a line to a set of points in a bitmap image. LibreCAD doesn't seem to allow selection of part of a bitmap so I would have the user draw a polygon enclosing the points to be used. I don't see any easy way to retrieve an image though. The only way I see is to use getAllEntities and then search it for the only Image entity. This seems cumbersome. Is there a better way of doing this?
When the polygon is created as polyline, then selected with image, you should get 2 objects.
One is the polyline, the other the image.
I don't know what getEnt() and getData() will return for polyline and image, but I assume that it should be possible to extract the vertices from these data and also the image path and location.
But I never used image or polyline in plugins, so it's also possible, that the interface lacks functionality here.
investing less than half an hour into Search function can save hours or days of waiting for a solution