From bb47a83e37ee5e26ebd75c2be6f7a140052dbbc6 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 17 Aug 2021 15:23:01 -0500 Subject: [PATCH] gen_readme --- README.md | 4 ++-- examples/text.nim | 2 +- examples/text_spans.nim | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4759975..ee8f9e3 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ font.size = 20 let text = "Typesetting is the arrangement and composition of text in graphic design and publishing in both digital and traditional medias." -image.fillText(font.typeset(text, bounds = vec2(180, 180)), vec2(10, 10)) +image.fillText(font.typeset(text, vec2(180, 180)), translate(vec2(10, 10))) ``` ![example output](examples/text.png) @@ -143,7 +143,7 @@ let spans = @[ newFont(typeface, 14, color(0.3125, 0.3125, 0.3125, 1))) ] -image.fillText(typeset(spans, bounds = vec2(180, 180)), vec2(10, 10)) +image.fillText(typeset(spans, vec2(180, 180)), translate(vec2(10, 10))) ``` ![example output](examples/text_spans.png) diff --git a/examples/text.nim b/examples/text.nim index 0048b79..05f16f3 100644 --- a/examples/text.nim +++ b/examples/text.nim @@ -8,5 +8,5 @@ font.size = 20 let text = "Typesetting is the arrangement and composition of text in graphic design and publishing in both digital and traditional medias." -image.fillText(font.typeset(text, bounds = vec2(180, 180)), vec2(10, 10)) +image.fillText(font.typeset(text, vec2(180, 180)), translate(vec2(10, 10))) image.writeFile("examples/text.png") diff --git a/examples/text_spans.nim b/examples/text_spans.nim index ebdb8f3..1649d97 100644 --- a/examples/text_spans.nim +++ b/examples/text_spans.nim @@ -19,5 +19,5 @@ let spans = @[ newFont(typeface, 14, color(0.3125, 0.3125, 0.3125, 1))) ] -image.fillText(typeset(spans, bounds = vec2(180, 180)), vec2(10, 10)) +image.fillText(typeset(spans, vec2(180, 180)), translate(vec2(10, 10))) image.writeFile("examples/text_spans.png")