|
Post by gregkovacs on Jan 6, 2019 16:39:37 GMT -8
Scaling up graphics is not hard. Just convert from Vertex2ii to Vertex2f and remember to bitshift the passed coordinates <<4.
Existing code works great. The problem is the commands for placing text on the screen. cmd_text() accepts the same coordinates as Vertex2ii.
What is needed (I think) is a Vertex2f-compatible text command that uses a common coordinate scale, or perhaps a unified Vertex2ii that can handle the 800 X 480 size of the 7" display.
Does anyone know of a simple work around for code that needs to run on both sizes of the Gameduino 3?
Thanks, Greg
|
|
|
Post by jamesbowman on Jan 8, 2019 15:51:42 GMT -8
@greg you might want to make a wrapper for Vertex2f() that always works in pixel-coordinates. Then drawing commands and cmd_text() can work in units of 1-pixel. Something like:
#define VX(x, y) GD.Vertex2f((x) << 4, (y) << 4)
|
|