Cleanup: rename functions in BLI_bitmap_draw_2d

This commit is contained in:
Campbell Barton 2016-10-26 20:14:48 +11:00
parent 3e36cbb3de
commit 8125271ddb
7 changed files with 12 additions and 11 deletions

View File

@ -998,9 +998,10 @@ static void track_mask_gpencil_layer_rasterize(int frame_width, int frame_height
point[1] = (stroke_points[i].y - marker->search_min[1]) * frame_height;
}
/* TODO: add an option to control whether AA is enabled or not */
fill_poly_v2i_n(0, 0, mask_width, mask_height,
(const int (*)[2])mask_points, stroke->totpoints,
track_mask_set_pixel_cb, &data);
BLI_bitmap_draw_2d_poly_v2i_n(
0, 0, mask_width, mask_height,
(const int (*)[2])mask_points, stroke->totpoints,
track_mask_set_pixel_cb, &data);
MEM_freeN(mask_points);
}
stroke = stroke->next;

View File

@ -25,11 +25,11 @@
* \ingroup bli
*/
void plot_line_v2v2i(
void BLI_bitmap_draw_2d_line_v2v2i(
const int p1[2], const int p2[2],
bool (*callback)(int, int, void *), void *userData);
void fill_poly_v2i_n(
void BLI_bitmap_draw_2d_poly_v2i_n(
const int xmin, const int ymin, const int xmax, const int ymax,
const int polyXY[][2], const int polyCorners,
void (*callback)(int x, int x_end, int y, void *), void *userData);

View File

@ -40,7 +40,7 @@
/**
* Plot a line from \a p1 to \a p2 (inclusive).
*/
void plot_line_v2v2i(
void BLI_bitmap_draw_2d_line_v2v2i(
const int p1[2], const int p2[2],
bool (*callback)(int, int, void *), void *userData)
{
@ -117,7 +117,7 @@ void plot_line_v2v2i(
* } while (++x != x_end);
* \endcode
*/
void fill_poly_v2i_n(
void BLI_bitmap_draw_2d_poly_v2i_n(
const int xmin, const int ymin, const int xmax, const int ymax,
const int verts[][2], const int nr,
void (*callback)(int x, int x_end, int y, void *), void *userData)

View File

@ -295,7 +295,7 @@ bool EDBM_backbuf_border_mask_init(ViewContext *vc, const int mcords[][2], short
lasso_mask_data.px = dr_mask;
lasso_mask_data.width = (xmax - xmin) + 1;
fill_poly_v2i_n(
BLI_bitmap_draw_2d_poly_v2i_n(
xmin, ymin, xmax + 1, ymax + 1,
mcords, tot,
edbm_mask_lasso_px_cb, &lasso_mask_data);

View File

@ -440,7 +440,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op)
data.width = data.rect.xmax - data.rect.xmin;
data.px = BLI_BITMAP_NEW(data.width * (data.rect.ymax - data.rect.ymin), __func__);
fill_poly_v2i_n(
BLI_bitmap_draw_2d_poly_v2i_n(
data.rect.xmin, data.rect.ymin, data.rect.xmax, data.rect.ymax,
mcords, mcords_tot,
mask_lasso_px_cb, &data);

View File

@ -5053,7 +5053,7 @@ bool ED_view3d_autodist_depth_seg(ARegion *ar, const int mval_sta[2], const int
copy_v2_v2_int(p1, mval_sta);
copy_v2_v2_int(p2, mval_end);
plot_line_v2v2i(p1, p2, depth_segment_cb, &data);
BLI_bitmap_draw_2d_line_v2v2i(p1, p2, depth_segment_cb, &data);
*depth = data.depth;

View File

@ -273,7 +273,7 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
unsigned char *pixel_buf = MEM_callocN(sizeof(*pixel_buf) * w * h, __func__);
struct LassoFillData lasso_fill_data = {pixel_buf, w};
fill_poly_v2i_n(
BLI_bitmap_draw_2d_poly_v2i_n(
rect.xmin, rect.ymin, rect.xmax, rect.ymax,
(const int (*)[2])moves, tot,
draw_filled_lasso_px_cb, &lasso_fill_data);