17 #include "potracelib.h"
20 #define BM_WORDSIZE ((int)sizeof(potrace_word))
21 #define BM_WORDBITS (8 * BM_WORDSIZE)
22 #define BM_HIBIT (((potrace_word)1) << (BM_WORDBITS - 1))
23 #define BM_ALLBITS (~(potrace_word)0)
25 #define bm_scanline(bm, y) ((bm)->map + (y) * (bm)->dy)
26 #define bm_index(bm, x, y) (&bm_scanline(bm, y)[(x) / BM_WORDBITS])
27 #define bm_mask(x) (BM_HIBIT >> ((x) & (BM_WORDBITS - 1)))
28 #define bm_range(x, a) ((int)(x) >= 0 && (int)(x) < (a))
29 #define bm_safe(bm, x, y) (bm_range(x, (bm)->w) && bm_range(y, (bm)->h))
31 #define BM_UGET(bm, x, y) ((*bm_index(bm, x, y) & bm_mask(x)) != 0)
32 #define BM_USET(bm, x, y) (*bm_index(bm, x, y) |= bm_mask(x))
33 #define BM_UCLR(bm, x, y) (*bm_index(bm, x, y) &= ~bm_mask(x))
34 #define BM_UINV(bm, x, y) (*bm_index(bm, x, y) ^= bm_mask(x))
35 #define BM_UPUT(bm, x, y, b) ((b) ? BM_USET(bm, x, y) : BM_UCLR(bm, x, y))
36 #define BM_GET(bm, x, y) (bm_safe(bm, x, y) ? BM_UGET(bm, x, y) : 0)
37 #define BM_SET(bm, x, y) (bm_safe(bm, x, y) ? BM_USET(bm, x, y) : 0)
38 #define BM_CLR(bm, x, y) (bm_safe(bm, x, y) ? BM_UCLR(bm, x, y) : 0)
39 #define BM_INV(bm, x, y) (bm_safe(bm, x, y) ? BM_UINV(bm, x, y) : 0)
40 #define BM_PUT(bm, x, y, b) (bm_safe(bm, x, y) ? BM_UPUT(bm, x, y, b) : 0)
43 #define GPENCIL_TRACE_MODE_SINGLE 0
44 #define GPENCIL_TRACE_MODE_SEQUENCE 1
77 const potrace_bitmap_t *
bm,
ATTR_WARN_UNUSED_RESULT BMesh * bm
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void ED_gpencil_trace_bitmap_print(FILE *f, const potrace_bitmap_t *bm)
void ED_gpencil_trace_data_to_strokes(struct Main *bmain, potrace_state_t *st, struct Object *ob, struct bGPDframe *gpf, int32_t offset[2], float scale, float sample, int32_t resolution, int32_t thickness)
void ED_gpencil_trace_bitmap_free(const potrace_bitmap_t *bm)
void ED_gpencil_trace_image_to_bitmap(struct ImBuf *ibuf, const potrace_bitmap_t *bm, float threshold)
void ED_gpencil_trace_bitmap_invert(const potrace_bitmap_t *bm)
potrace_bitmap_t * ED_gpencil_trace_bitmap_new(int32_t w, int32_t h)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
static const pxr::TfToken st("st", pxr::TfToken::Immortal)