Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_select.c
| Show First 20 Lines • Show All 899 Lines • ▼ Show 20 Lines | for (i = 0; (i + 1) < gps->totpoints; i++) { | ||||
| gp_point_to_parent_space(pt2, diff_mat, &npt); | gp_point_to_parent_space(pt2, diff_mat, &npt); | ||||
| gp_point_to_xy(gsc, gps, &npt, &x1, &y1); | gp_point_to_xy(gsc, gps, &npt, &x1, &y1); | ||||
| /* check that point segment of the boundbox of the selection stroke */ | /* check that point segment of the boundbox of the selection stroke */ | ||||
| if (((!ELEM(V2D_IS_CLIPPED, x0, y0)) && BLI_rcti_isect_pt(rect, x0, y0)) || | if (((!ELEM(V2D_IS_CLIPPED, x0, y0)) && BLI_rcti_isect_pt(rect, x0, y0)) || | ||||
| ((!ELEM(V2D_IS_CLIPPED, x1, y1)) && BLI_rcti_isect_pt(rect, x1, y1))) | ((!ELEM(V2D_IS_CLIPPED, x1, y1)) && BLI_rcti_isect_pt(rect, x1, y1))) | ||||
| { | { | ||||
| int mval[2] = {mx, my}; | float mval[2] = {(float)mx, (float)my}; | ||||
| int mvalo[2] = {mx, my}; /* dummy - this isn't used... */ | float mvalo[2] = {(float)mx, (float)my}; /* dummy - this isn't used... */ | ||||
| /* check if point segment of stroke had anything to do with | /* check if point segment of stroke had anything to do with | ||||
| * eraser region (either within stroke painted, or on its lines) | * eraser region (either within stroke painted, or on its lines) | ||||
| * - this assumes that linewidth is irrelevant | * - this assumes that linewidth is irrelevant | ||||
| */ | */ | ||||
| if (gp_stroke_inside_circle(mval, mvalo, radius, x0, y0, x1, y1)) { | if (gp_stroke_inside_circle(mval, mvalo, radius, x0, y0, x1, y1)) { | ||||
| /* change selection of stroke, and then of both points | /* change selection of stroke, and then of both points | ||||
| * (as the last point otherwise wouldn't get selected | * (as the last point otherwise wouldn't get selected | ||||
| ▲ Show 20 Lines • Show All 585 Lines • Show Last 20 Lines | |||||