diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_fill.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index f0adb901f88..541b6673cb6 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1072,7 +1072,7 @@ static void gpencil_erase_processed_area(tGPDfill *tgpf) /* First set in blue the perimeter. */ for (int i = 0; i < tgpf->sbuffer_used && point2D; i++, point2D++) { - int image_idx = ibuf->x * (int)point2D->y + (int)point2D->x; + int image_idx = ibuf->x * (int)point2D->m_xy[1] + (int)point2D->m_xy[0]; set_pixel(ibuf, image_idx, blue_col); } @@ -1393,7 +1393,7 @@ static void gpencil_get_depth_array(tGPDfill *tgpf) for (i = 0, ptc = tgpf->sbuffer; i < totpoints; i++, ptc++) { int mval_i[2]; - round_v2i_v2fl(mval_i, &ptc->x); + round_v2i_v2fl(mval_i, ptc->m_xy); if ((ED_view3d_depth_read_cached(depths, mval_i, depth_margin, tgpf->depth_arr + i) == 0) && (i && (ED_view3d_depth_read_cached_seg( @@ -1437,9 +1437,9 @@ static int gpencil_points_from_stack(tGPDfill *tgpf) while (!BLI_stack_is_empty(tgpf->stack)) { int v[2]; BLI_stack_pop(tgpf->stack, &v); - copy_v2fl_v2i(&point2D->x, v); + copy_v2fl_v2i(point2D->m_xy, v); /* shift points to center of pixel */ - add_v2_fl(&point2D->x, 0.5f); + add_v2_fl(point2D->m_xy, 0.5f); point2D->pressure = 1.0f; point2D->strength = 1.0f; point2D->time = 0.0f; @@ -2125,7 +2125,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event) tgpf->gps_mouse = BKE_gpencil_stroke_new(0, 1, 10.0f); tGPspoint point2D; bGPDspoint *pt = &tgpf->gps_mouse->points[0]; - copy_v2fl_v2i(&point2D.x, tgpf->mouse); + copy_v2fl_v2i(point2D.m_xy, tgpf->mouse); gpencil_stroke_convertcoords_tpoint( tgpf->scene, tgpf->region, tgpf->ob, &point2D, NULL, &pt->x); |