[Bf-blender-cvs] [579c6200de1] greasepencil-object: GPencil: Cleanup - rename trace functions
Antonio Vazquez
noreply at git.blender.org
Wed Jul 22 18:15:22 CEST 2020
Commit: 579c6200de1bbe7e68c4108f7d3c14f205e84b4d
Author: Antonio Vazquez
Date: Wed Jul 22 18:15:10 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB579c6200de1bbe7e68c4108f7d3c14f205e84b4d
GPencil: Cleanup - rename trace functions
===================================================================
M source/blender/editors/gpencil/gpencil_trace.h
M source/blender/editors/gpencil/gpencil_trace_ops.c
M source/blender/editors/gpencil/gpencil_trace_utils.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_trace.h b/source/blender/editors/gpencil/gpencil_trace.h
index 675674f2c48..750b478f5ff 100644
--- a/source/blender/editors/gpencil/gpencil_trace.h
+++ b/source/blender/editors/gpencil/gpencil_trace.h
@@ -56,15 +56,15 @@ struct Object;
#define BM_INV(bm, x, y) (bm_safe(bm, x, y) ? BM_UINV(bm, x, y) : 0)
#define BM_PUT(bm, x, y, b) (bm_safe(bm, x, y) ? BM_UPUT(bm, x, y, b) : 0)
-void ED_gpencil_trace_bm_print(FILE *f, const potrace_bitmap_t *bm);
+void ED_gpencil_trace_bitmap_print(FILE *f, const potrace_bitmap_t *bm);
-potrace_bitmap_t *ED_gpencil_trace_bm_new(int w, int h);
-void ED_gpencil_trace_bm_free(const potrace_bitmap_t *bm);
+potrace_bitmap_t *ED_gpencil_trace_bitmap_new(int w, int h);
+void ED_gpencil_trace_bitmap_free(const potrace_bitmap_t *bm);
void ED_gpencil_trace_bm_invert(const potrace_bitmap_t *bm);
-void ED_gpencil_trace_image_to_bm(struct ImBuf *ibuf,
- const potrace_bitmap_t *bm,
- const float threshold);
+void ED_gpencil_trace_image_to_bitmap(struct ImBuf *ibuf,
+ const potrace_bitmap_t *bm,
+ const float threshold);
void ED_gpencil_trace_data_to_strokes(struct Main *bmain,
potrace_state_t *st,
diff --git a/source/blender/editors/gpencil/gpencil_trace_ops.c b/source/blender/editors/gpencil/gpencil_trace_ops.c
index dc0b68bd15f..efecab4c15a 100644
--- a/source/blender/editors/gpencil/gpencil_trace_ops.c
+++ b/source/blender/editors/gpencil/gpencil_trace_ops.c
@@ -89,7 +89,7 @@ static bool gpencil_trace_image(
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
/* Create an empty BW bitmap. */
- bm = ED_gpencil_trace_bm_new(ibuf->x, ibuf->y);
+ bm = ED_gpencil_trace_bitmap_new(ibuf->x, ibuf->y);
if (!bm) {
return false;
}
@@ -103,12 +103,12 @@ static bool gpencil_trace_image(
param->turnpolicy = turnpolicy;
/* Load BW bitmap with image. */
- ED_gpencil_trace_image_to_bm(ibuf, bm, threshold);
+ ED_gpencil_trace_image_to_bitmap(ibuf, bm, threshold);
/* Trace the bitmap. */
st = potrace_trace(param, bm);
if (!st || st->status != POTRACE_STATUS_OK) {
- ED_gpencil_trace_bm_free(bm);
+ ED_gpencil_trace_bitmap_free(bm);
if (st) {
potrace_state_free(st);
}
@@ -116,7 +116,7 @@ static bool gpencil_trace_image(
return false;
}
/* Free BW bitmap. */
- ED_gpencil_trace_bm_free(bm);
+ ED_gpencil_trace_bitmap_free(bm);
/* Convert the trace to strokes. */
int offset[2];
diff --git a/source/blender/editors/gpencil/gpencil_trace_utils.c b/source/blender/editors/gpencil/gpencil_trace_utils.c
index f1974c40390..956cbd1c431 100644
--- a/source/blender/editors/gpencil/gpencil_trace_utils.c
+++ b/source/blender/editors/gpencil/gpencil_trace_utils.c
@@ -50,7 +50,7 @@
* \param f: Output handle. Use stderr for printing
* \param bm: Trace bitmap
*/
-void ED_gpencil_trace_bm_print(FILE *f, const potrace_bitmap_t *bm)
+void ED_gpencil_trace_bitmap_print(FILE *f, const potrace_bitmap_t *bm)
{
int x, y;
int xx, yy;
@@ -82,7 +82,7 @@ void ED_gpencil_trace_bm_print(FILE *f, const potrace_bitmap_t *bm)
* \param h: Height in pixels
* \return: Trace bitmap
*/
-potrace_bitmap_t *ED_gpencil_trace_bm_new(int w, int h)
+potrace_bitmap_t *ED_gpencil_trace_bitmap_new(int w, int h)
{
potrace_bitmap_t *bm;
int dy = (w + BM_WORDBITS - 1) / BM_WORDBITS;
@@ -107,7 +107,7 @@ potrace_bitmap_t *ED_gpencil_trace_bm_new(int w, int h)
* Free a trace bitmap
* \param bm: Trace bitmap
*/
-void ED_gpencil_trace_bm_free(const potrace_bitmap_t *bm)
+void ED_gpencil_trace_bitmap_free(const potrace_bitmap_t *bm)
{
if (bm != NULL) {
free(bm->map);
@@ -166,7 +166,9 @@ static void pixel_at_index(const ImBuf *ibuf, const int idx, float r_col[4])
* \param ibuf: ImBuf of the image
* \param bm: Trace bitmap
*/
-void ED_gpencil_trace_image_to_bm(ImBuf *ibuf, const potrace_bitmap_t *bm, const float threshold)
+void ED_gpencil_trace_image_to_bitmap(ImBuf *ibuf,
+ const potrace_bitmap_t *bm,
+ const float threshold)
{
float rgba[4];
int pixel = 0;
More information about the Bf-blender-cvs
mailing list