diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-07-17 16:03:11 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-07-17 16:03:11 (EDT) |
commit | 807706f08f4ddff2c66f4592c0db0cd261dd6227 (patch) | |
tree | 35672cc23c8daa9a9eb82ec7d855199ec78e1934 /src/main.c | |
parent | e6cba83cb3c92d623030fbe9e2ff058c84700b7c (diff) |
image_render(): Get dimensions from text
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -19,15 +19,22 @@ * along with fbcon2png. If not, see <http://www.gnu.org/licenses/>. */ +#include "text.h" #include "image.h" int -main(int __attribute__((unused)) argc, char __attribute__((unused)) **argv) +main(int argc, char **argv) { + struct text *text; struct image *image; + if (argc != 2) { + return 1; + } + + text = text_new(argv[1]); image = image_new("test.png"); - image_render(image); + image_render(image, text); image_destroy(&image); return 0; |