libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 274452610ee5d6b313d40df42d22c1423b2009f5
parent 97c7e29a7efe0daf21818492605da2f00be1b3c4
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 24 Oct 2018 21:41:18 +0200

Rename the retinaScaleFactor struct member to scale_factor

Diffstat:
Minclude/ansilove.h | 2+-
Msrc/output.c | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/ansilove.h b/include/ansilove.h @@ -78,7 +78,7 @@ struct ansilove_options { bool icecolors; bool dos; bool truecolor; - uint32_t retinaScaleFactor; + uint32_t scale_factor; }; int ansilove_init(struct ansilove_ctx *, struct ansilove_options *); diff --git a/src/output.c b/src/output.c @@ -17,7 +17,7 @@ int output(struct ansilove_ctx *ctx, struct ansilove_options *options, gdImagePt // XXX The caller must invoke gdFree() // XXX Allow combining DOS aspect ratio and Retina - if (!options->retinaScaleFactor && !options->dos) { + if (!options->scale_factor && !options->dos) { ctx->png.buffer = gdImagePngPtr(im_Source, &ctx->png.length); } else if (options->dos) { gdImagePtr im_DOS; @@ -39,9 +39,9 @@ int output(struct ansilove_ctx *ctx, struct ansilove_options *options, gdImagePt } else { gdImagePtr im_Retina; - // make the Retina image retinaScaleFactor as large as im_Source - im_Retina = gdImageCreate(im_Source->sx * options->retinaScaleFactor, - im_Source->sy * options->retinaScaleFactor); + // make the Retina image scale_factor as large as im_Source + im_Retina = gdImageCreate(im_Source->sx * options->scale_factor, + im_Source->sy * options->scale_factor); if (!im_Retina) { ctx->error = ANSILOVE_GD_ERROR;