Currently, the only way to compute these values is to allocate a new PixelFormat and query it.
Now, the existing macros are exposed as top level functions.
They could be implemented in go, but that would need maintenance, I opted to use cgo instead.
The values in the test are the ones returned by the c implementation.
The documentation is a bit stuttery "xPerPixel returns the number of x per pixel", if anyone comes up with better wording, do tell!
Currently, the only way to compute these values is to allocate a new PixelFormat and query it. Now, the existing macros are exposed as top level functions.
They could be implemented in go, but that would need maintenance, I opted to use cgo instead. The values in the test are the ones returned by the c implementation.
The documentation is a bit stuttery "xPerPixel returns the number of x per pixel", if anyone comes up with better wording, do tell!