Create a backend device contract
Arguments
- begin
Function called with
width_mmandheight_mmbefore rendering.- end
Function called after rendering completes.
- draw
Function called as
draw(shape, data, resolved_aes)for each primitive.- push_clip
Function called as
push_clip(box)when entering a clipped viewport.- pop_clip
Function called when leaving a clipped viewport.
- svg
Function returning a serialized representation of the device output.
- save
Function called as
save(path)to write device output to disk.