mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 19:15:38 +08:00
fix(lv_image): fix touch area calculation (#8027)
This commit is contained in:
committed by
GitHub
parent
dae51218ab
commit
e0bfcd4228
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user