
Two more bugs:
With tolerance 0, draw a closed shape with calligraphic, paint black, and set 50% opacity. Paint bucket inside it. It says area is unbounded and cannot be filled - although the shape is clearly visible, and especially at zero tolerance it must be filled correctly.
Now make this shape opaque and paint it white. It is invisible, i.e. paint bucket must rightfully fail. Yet it succeeds!
I think both these bugs are caused by a wrong interpretation of colors. When you render the image to an arena, empty areas are fully transparent - but they are transparent black. It looks like you just interpret them as black - which is wrong. Instead you need to compose the arena with the canvas background color which is stored in NamedView, which is normally (but not always) transparent black, and the "under the background" color which is always opaque white. That is, there are three layers: always-white, background (which can be transparent to some degree or opaque), and the drawing. One way to properly compose that is by filling the pixblock you create for rendering arena with the proper background color (always-white composed with the background color/opacity, giving a fully opaque result) before you render into it, as is done in sp_export_get_rows for bitmap export.