fix(lv_image): fix touch area calculation (#8027)

This commit is contained in:
Gabor Kiss-Vamosi
2025-04-03 14:20:41 +02:00
committed by GitHub
parent dae51218ab
commit e0bfcd4228
+4 -1
View File
@@ -12,6 +12,9 @@
#include "../../draw/lv_draw_private.h"
#include "../../core/lv_obj_event_private.h"
#include "../../core/lv_obj_class_private.h"
#include "../../core/lv_obj_class_private.h"
#include "../../core/lv_obj_draw_private.h"
#if LV_USE_IMAGE != 0
#include "../../stdlib/lv_string.h"
@@ -673,7 +676,7 @@ static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e)
*perform hit test on its transformed area*/
if(img->w == lv_obj_get_width(obj) && img->h == lv_obj_get_height(obj) &&
(img->scale_x != LV_SCALE_NONE || img->scale_y != LV_SCALE_NONE ||
img->rotation != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) {
img->rotation != 0)) {
int32_t w = lv_obj_get_width(obj);
int32_t h = lv_obj_get_height(obj);