You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed several issues with graphics_draw_bitmap_in_rect.
Seems like Pebble's own function is actually more complex, somehow.
Big image files (larger than 168 pixels) somehow get cut off weirdly.
I've first noticed this in my game Western Ideals.
The titlescreen image file itself is 200 pixels big. It works as expected and i can scroll through the entire image. Not so on RebbleOS where a part of the pict is cut off.
See this line of code for reference: https://github.com/gameblabla/western_ideals/blob/master/src/c/test.c#L713
After noticing this,
i tried to trim it down to see if it wasn't just an implemented function or anything funky.
I've made a small program that you can scroll the picture through with the buttons.
I could sadly confirm that the image here too gets cut off.
It also has a height of 200 pixels.
See the program here : https://github.com/gameblabla/testapp_pebble/tree/master/test_bigpict
I've also noticed another interesting corner case that is also not supported by RebbleOS.
What if i try to display a picture smaller than the screen size and then tell graphics_draw_bitmap_in_rect to use the full screen size ? graphics_draw_bitmap_in_rect(ctx, current_background, GRect(0, 0, 144, 168));
The picture itself is only 140 pixels big in height. However, we tell the function to draw it as if it was bigger than that.
This interesting thing happens. However, it only does so if the image is smaller than the screen size.
See https://github.com/gameblabla/testapp_pebble/tree/master/test_fillrect to give it a try.
Of course, i only tried vertically but i'm sure it has the same issues horizontally as well.
I probably scratched only the surface so more investigating might be needed.
The text was updated successfully, but these errors were encountered:
I have noticed several issues with graphics_draw_bitmap_in_rect.
Seems like Pebble's own function is actually more complex, somehow.
Big image files (larger than 168 pixels) somehow get cut off weirdly.
I've first noticed this in my game Western Ideals.
The titlescreen image file itself is 200 pixels big. It works as expected and i can scroll through the entire image. Not so on RebbleOS where a part of the pict is cut off.
See this line of code for reference:
https://github.com/gameblabla/western_ideals/blob/master/src/c/test.c#L713
After noticing this,
i tried to trim it down to see if it wasn't just an implemented function or anything funky.
I've made a small program that you can scroll the picture through with the buttons.
I could sadly confirm that the image here too gets cut off.
It also has a height of 200 pixels.
See the program here : https://github.com/gameblabla/testapp_pebble/tree/master/test_bigpict
I've also noticed another interesting corner case that is also not supported by RebbleOS.
What if i try to display a picture smaller than the screen size and then tell graphics_draw_bitmap_in_rect to use the full screen size ?
graphics_draw_bitmap_in_rect(ctx, current_background, GRect(0, 0, 144, 168));
The picture itself is only 140 pixels big in height. However, we tell the function to draw it as if it was bigger than that.
This interesting thing happens. However, it only does so if the image is smaller than the screen size.
See https://github.com/gameblabla/testapp_pebble/tree/master/test_fillrect to give it a try.
Of course, i only tried vertically but i'm sure it has the same issues horizontally as well.
I probably scratched only the surface so more investigating might be needed.
The text was updated successfully, but these errors were encountered: