Writergate fix for tinyvg?

On further thought, you don’t seem to have done anything regarding the new writer interface yet, so here’s an explanation.

The new reader/writer interfaces are intrusive interfaces, meaning they are intended to be used as fields of the implementing type, the interface functions you implement and pass the interface field when you create your type will be given a pointer to the reader/writer. The implemented functions access the implementation state using @fieldParentPtr.

The above means you can’t copy the interface field out of the implementation type, it must be referenced by a pointer. You also can’t move the implementation while a pointer to the interface is being used, but that’s not specific to intrusive interfaces.

The new interfaces have their own state of a buffer and indexes for where in the buffer is actual data or unused space, which the implementations are expected to access and modify.

Look at std.Io.Writer.Allocating or std.fs.File.Writer for examples.

Here is a video that explains it well Video: Zig's new Reader and Writer interfaces (std.Io, 0.15.1)