From 97b60443f89d1a0814a91675e2b803750649ab7f Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Wed, 12 Jun 2019 13:49:05 -0400 Subject: [PATCH] README: update to example code following API changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ae51e2..997e1c9 100644 --- a/README.md +++ b/README.md @@ -71,11 +71,11 @@ Before using the library in a program, a configuration step is needed. The libra The three rendering functions are available in fxlib; for monospaced fonts the fourth can be implemented trivially. In gint, the four can be defined as wrappers for `dpixel()`, `dline()`, `dsize()` and `dtext()`. -The type of formulae is `TeX_Flow`. To parse and compute the size of a formula, use the `TeX_parse()` function, which returns a new formula object (or `NULL` if a critical error occurs). +The type of formulae is `TeX_Env`. To parse and compute the size of a formula, use the `TeX_parse()` function, which returns a new formula object (or `NULL` if a critical error occurs). ```c char *code = "\\frac{x_7}{\\left\\{\\frac{\\frac{2}{3}}{27}\\right\\}^2}"; -struct TeX_Flow *formula = TeX_parse(code); +struct TeX_Env *formula = TeX_parse(code); ``` The size of the formula can be queried through `formula->width` and `formula->height`. To render, specify the location of the top-left corner and the drawing color (which will be passed to all primitives):