Masked fill

Hello,

I can draw lines and filled and outlined polygons, although not all
features work (line caps, winding rule for filled polygons).

To draw outlined ellipses, I need a way to produce a clipping region
that follows a curve, and then fill in a source image behind it.

I'm experimenting with the following, but I don't have it working yet:

procedure MaskedFill(dst, src, mask: images)
	img: transparent scratch image

	draw mask to img
	draw src to img using source-in compositing operator
	draw img to dst
end procedure

procedure OutlineEllipse(dst, src: images, coords: specify ellipse shape)
	mask: transparent scratch image

	draw ellipse(coords) to mask
	MaskedFill(dst, src, mask)
end procedure

-- David