XPCE: How to fill a path of lines and bezier curves?

I am currently trying to parse and draw svg d path using prolog.
I found that xpce can draw lines, bezier curves and arcs which are all the graphical components needed to draw the path.
However, how would I fill such path ?

I have found the path class in xpce but I believe we can only draw a polyline or a smooth line with a list of points.
Would it be possible to pass a list of line/4 and bezier_curve/4 instead ?

Here is an example of a list of lines and bezier curves that I would like to fill :


I’m afraid you can’t, unless you can build the final shape from a number of things that can be filled each. Smooth paths use bezier curves (I think), so maybe you can combine arcs, smooth and non-smooth paths?

Do you know if we can modify the control points of the bezier curves of smooth paths ?
As a last resort, I suppose I could interpolate points from my curves and draw that.
Although, that does not help with multi path shapes…

By the way, I have stumbled upon the PceDraw program and I kind of love it :slight_smile:
Is there a way to send a list of drawing commands to PceDraw ?
I have read the realize_drawing/2 from library('draw/importpl') but that does not draw inside PceDraw but in a simple device.

I don’t recall. Check the source :slight_smile:

I do not think so. After all it is simply a device with objects displayed on it, so it should be ewasy enough to create a drawing from Prolog rather then through the UI.

Enjoy :slight_smile: