@@ -244,8 +244,8 @@ static int get_size(lua_State* L)
244
244
// Wrapper around draw callback to plugdata
245
245
static inline void plugdata_draw (t_pdlua * obj , t_symbol * sym , int argc , t_atom * argv )
246
246
{
247
- if (obj -> gfx .plugdata_callback_target ) {
248
- obj -> gfx .plugdata_draw_callback (obj -> gfx . plugdata_callback_target , sym , argc , argv );
247
+ if (obj -> gfx .plugdata_draw_callback ) {
248
+ obj -> gfx .plugdata_draw_callback (obj , sym , argc , argv );
249
249
}
250
250
}
251
251
@@ -637,9 +637,11 @@ static void gfx_displace(t_pdlua *x, t_glist *glist, int dx, int dy)
637
637
sys_vgui (".x%lx.c move .x%lx %d %d\n" , glist_getcanvas (x -> canvas ), (long )x , dx , dy );
638
638
canvas_fixlinesfor (glist , (t_text * )x );
639
639
640
+ auto scale = glist_getzoom (glist_getcanvas (x -> canvas ));
641
+
640
642
int xpos = text_xpix ((t_object * )x , x -> canvas );
641
643
int ypos = text_ypix ((t_object * )x , x -> canvas );
642
- glist_drawiofor (glist_getcanvas ( x -> canvas ) , (t_object * )x , 0 , x -> gfx .object_tag , xpos , ypos , xpos + x -> gfx .width , ypos + x -> gfx .height );
644
+ glist_drawiofor (x -> canvas , (t_object * )x , 0 , x -> gfx .object_tag , xpos , ypos , xpos + ( x -> gfx .width * scale ) , ypos + ( x -> gfx .height * scale ) );
643
645
}
644
646
645
647
static const char * register_drawing (t_pdlua * object )
0 commit comments