summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPatrick 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)
commit807706f08f4ddff2c66f4592c0db0cd261dd6227 (patch)
tree35672cc23c8daa9a9eb82ec7d855199ec78e1934 /src/main.c
parente6cba83cb3c92d623030fbe9e2ff058c84700b7c (diff)
image_render(): Get dimensions from text
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cce97e9..0731f7b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;