Replies: 1 comment 1 reply
-
|
The implementation clamps both size axes to at least textsize_x = (s_x > 0) ? s_x : 1;
textsize_y = (s_y > 0) ? s_y : 1;So examples using If you can still reproduce the offset with an explicit |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been doing a bit of debugging and testing on the positioning of the small text as there seems to be an issue with V1.4.2 ,It seems as though if xs && ys scale in the gfx->setTextSize (x scale, Yscale) function are both <= 1 then the text print off by +60 in X and +94 in Y, if the initial Cursor pos is 120,120 and +28 in x and +94 in Y if the cursor position 240 ,240 .. Dedecuting these amounts brings them back into alighnment. ( haven't worked out the relationship between the offset x being +60 when the cursor is at 120, 120 and +28 when the cursor is at 240,240 .) On reset of the device however that value of offset can be thrown off depending where it is in the loop on the point of reset and then sometimes it is off by a random amount again possibly if the cursor wasn't reset in the loop function or the offset is correct again . Also I haven't worked out the relationship between the offset x being +60 when the cursor is at 120, 120 and +28 when the cursor is at 240,240 . The y offset seems to stay at +94. In the following the code (cursor at 240,240 )it + sign prints first and setTextScale x & y both set to 1 - It then prints a small red cross which if off by +28 in x and +96 in Y. It then proceeds to print "hello world" in various randone scales xs and ys. If setTextSize xs and ys are greater than 1 then it prints in the correct location 240,240 , if they are both <=1 it prints where the first +(xs and ys =1 (if have tried various combinations 1,0 and 0,1 ) was printed and it prints "there that proves it " . Then is sets the cursor by the offsets I mention x-28 and y-94 and prints [] which is then in the correct location. -Important to make a rule that says no fonts sizes where both xs && ys <= 1 in gfx->setTextScale(xs,ys) . 2,0 is fine as is 0,2
(remeber to switch on the back light pin 1).
Beta Was this translation helpful? Give feedback.
All reactions