| line |
true |
false |
branch |
|
46
|
0 |
0 |
if (!ctx) return NULL; |
|
67
|
0 |
0 |
if (!ctx) return NULL; |
|
68
|
0 |
0 |
if (ctx->width > 0 && ctx->height > 0) { |
|
|
0 |
0 |
if (ctx->width > 0 && ctx->height > 0) { |
|
71
|
0 |
0 |
if (!ctx->pixels) { |
|
84
|
0 |
0 |
if (!ctx) return NULL; |
|
86
|
0 |
0 |
ctx->stride = stride > 0 ? stride : ctx->stride; |
|
93
|
0 |
0 |
if (!ctx) return; |
|
94
|
0 |
0 |
if (ctx->owns_buffer && ctx->pixels) free(ctx->pixels); |
|
|
0 |
0 |
if (ctx->owns_buffer && ctx->pixels) free(ctx->pixels); |
|
95
|
0 |
0 |
if (ctx->clip_mask) free(ctx->clip_mask); |
|
96
|
0 |
0 |
if (ctx->stroke_style.dash_array) free(ctx->stroke_style.dash_array); |
|
97
|
0 |
0 |
if (ctx->gstate_stack) free(ctx->gstate_stack); |
|
107
|
0 |
0 |
double a = c.a < 0 ? 0 : (c.a > 1 ? 1 : c.a); |
|
|
0 |
0 |
double a = c.a < 0 ? 0 : (c.a > 1 ? 1 : c.a); |
|
108
|
0 |
0 |
double r = c.r < 0 ? 0 : (c.r > 1 ? 1 : c.r); |
|
|
0 |
0 |
double r = c.r < 0 ? 0 : (c.r > 1 ? 1 : c.r); |
|
109
|
0 |
0 |
double g = c.g < 0 ? 0 : (c.g > 1 ? 1 : c.g); |
|
|
0 |
0 |
double g = c.g < 0 ? 0 : (c.g > 1 ? 1 : c.g); |
|
110
|
0 |
0 |
double b = c.b < 0 ? 0 : (c.b > 1 ? 1 : c.b); |
|
|
0 |
0 |
double b = c.b < 0 ? 0 : (c.b > 1 ? 1 : c.b); |
|
122
|
0 |
0 |
if (!ctx || !ctx->pixels) return; |
|
|
0 |
0 |
if (!ctx || !ctx->pixels) return; |
|
125
|
0 |
0 |
for (i = 0; i < total; i++) ctx->pixels[i] = packed; |
|
130
|
0 |
0 |
if (!ctx || !ctx->pixels) return 0; |
|
|
0 |
0 |
if (!ctx || !ctx->pixels) return 0; |
|
131
|
0 |
0 |
if (x < 0 || y < 0 || x >= ctx->width || y >= ctx->height) return 0; |
|
|
0 |
0 |
if (x < 0 || y < 0 || x >= ctx->width || y >= ctx->height) return 0; |
|
|
0 |
0 |
if (x < 0 || y < 0 || x >= ctx->width || y >= ctx->height) return 0; |
|
|
0 |
0 |
if (x < 0 || y < 0 || x >= ctx->width || y >= ctx->height) return 0; |
|
142
|
0 |
0 |
if (!ctx) return PDFMAKE_RENDER_ERR_NULL; |
|
143
|
0 |
0 |
if (ctx->gstate_depth >= ctx->gstate_max) { |
|
144
|
0 |
0 |
int new_max = ctx->gstate_max ? ctx->gstate_max * 2 : 8; |
|
147
|
0 |
0 |
if (!grown) return PDFMAKE_RENDER_ERR_MEMORY; |
|
166
|
0 |
0 |
if (!ctx) return PDFMAKE_RENDER_ERR_NULL; |
|
167
|
0 |
0 |
if (ctx->gstate_depth <= 0) return PDFMAKE_RENDER_ERR_INVALID; |
|
186
|
0 |
0 |
if (!ctx) return; |
|
193
|
0 |
0 |
if (!ctx) return; |
|
199
|
0 |
0 |
if (!ctx) return; |
|
206
|
0 |
0 |
if (!ctx) return; |
|
213
|
0 |
0 |
if (!ctx) return; |
|
219
|
0 |
0 |
if (!ctx) return; |
|
227
|
0 |
0 |
if (!ctx) return PDFMAKE_RENDER_ERR_NULL; |
|
228
|
0 |
0 |
if (ctx->stroke_style.dash_array) { |
|
233
|
0 |
0 |
if (array && count > 0) { |
|
|
0 |
0 |
if (array && count > 0) { |
|
235
|
0 |
0 |
if (!copy) return PDFMAKE_RENDER_ERR_MEMORY; |
|
247
|
0 |
0 |
if (!ctx) return; |
|
253
|
0 |
0 |
if (!ctx) return; |
|
254
|
0 |
0 |
ctx->flatness = flatness > 0 ? flatness : 1.0; |
|
283
|
0 |
0 |
if (!ctx || !m) return; |
|
|
0 |
0 |
if (!ctx || !m) return; |
|
290
|
0 |
0 |
if (!ctx || !m) return; |
|
|
0 |
0 |
if (!ctx || !m) return; |
|
298
|
0 |
0 |
if (!ctx) return; |
|
306
|
0 |
0 |
if (!ctx) return; |
|
315
|
0 |
0 |
if (!ctx) return; |
|
330
|
0 |
0 |
if (!ctx) return PDFMAKE_RENDER_ERR_NULL; |
|
331
|
0 |
0 |
if (!ctx->path) { |
|
333
|
0 |
0 |
if (!ctx->path) return PDFMAKE_RENDER_ERR_MEMORY; |
|
342
|
0 |
0 |
if (e != PDFMAKE_RENDER_OK) return e; |
|
350
|
0 |
0 |
if (e != PDFMAKE_RENDER_OK) return e; |
|
358
|
0 |
0 |
if (e != PDFMAKE_RENDER_OK) return e; |
|
364
|
0 |
0 |
if (!ctx || !ctx->path) return PDFMAKE_RENDER_ERR_NULL; |
|
|
0 |
0 |
if (!ctx || !ctx->path) return PDFMAKE_RENDER_ERR_NULL; |
|
373
|
0 |
0 |
if (e != PDFMAKE_RENDER_OK) return e; |
|
379
|
0 |
0 |
if (!ctx) return; |
|
380
|
0 |
0 |
if (ctx->path) pdfmake_path_clear(ctx->path); |