: asapien/signet

commit 3a88808875b05524a4004af6d937499322886140
parent 63353aef350197cfeecbfdcb62b85afa5d218de0
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 19 Sep 2026 04:32:26 +0530

Add clarifying comment on Y-axis transform in render_sign

Explain PDF coordinate system inversion (bottom-left origin vs top-left image coords).
Per code standards: comment when WHY is non-obvious.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/render.c b/src/render.c
@@ -432,6 +432,7 @@ render_sign(const struct render_ctx *cx, const char *body, const char *out,
 	}
 	
 	pdfw_page(pw, ps[page - 1].w, ps[page - 1].h);
+	/* PDF origin is bottom-left; convert placement y from top-left to bottom-left */
 	if (pdfw_image(pw, png, x, ps[page - 1].h - y - h, w, h) == -1) {
 		pdfw_close(pw);
 		free(ps);