In both the simulator and on hardware running 1.12.3, the C API drawRect appears to draw two of the same pixels multiple times. This is generally not a problem; but produces unexpected results when rendering using kColorXOR.
I am reproducing this on macOS; and haven't tried on other OS'es nor have tried this with a Lua implementation.
Steps to reproduce:
- Draw a rect using
drawRect, withkColorXOR
Expected result:
- The rect is fully drawn, no pixels are missing
Observed result:
- The rect is missing the bottom left and bottom right pixels
It appears that the drawRect implementation may be drawing the same pixels multiple times; when using the XOR color, the overdraw causes these pixels to flip and be "missing" in the rendered output.
Here is display output from a sample project that does the following:
- Draw a rect using
drawRect+kColorXOR- Do the same, but scaled to make it easier to see the problem
- Draw a rect "manually" using 4
drawLinecalls and ensuring there is no overlapping drawing- Do the same, but scaled to make it easier to see the problem is resolved

Also, for convenience in reproducing:
-
A pre-build
pdxthat should run in the simulator or hardware:- 2_drawRectWithXOR_pdx.zip (4.9 KB)
-
A complete project bundle with additional comments. NOTE: This is a single source project; if the SDK is on your path you should be able to
maketo build it and use the producedpdx.- 2_drawRectWithXOR_project.zip (6.4 KB)