Blame src/font.h

f63775
#ifndef HELI_FONT_H
f63775
#define HELI_FONT_H
f63775
f63775
f63775
#include "common.h"
f63775
f63775
f63775
typedef struct _Font *Font;
da4619
typedef struct _TextLayout *TextLayout;
f63775
f63775
f63775
typedef enum _HAlign {
f63775
	HALIGN_LEFT,
f63775
	HALIGN_CENTER,
f63775
	HALIGN_RIGHT
f63775
} HAlign;
f63775
f63775
typedef enum _VAlign {
f63775
	VALIGN_TOP,
f63775
	VALIGN_CENTER,
f63775
	VALIGN_BOTTOM
f63775
} VAlign;
f63775
f63775
f63775
Font createFont(const char *path);
f63775
void fontDestroy(Font font);
f63775
void textFont(Font font);
f63775
void textFontDefault();
f63775
f63775
void text(const char *text, double x, double y);
f63775
void textAlign(HAlign hor, VAlign vert);
f63775
void textSize(double size);
f63775
da4619
TextLayout createTextLayout(const char *text);
da4619
void textLayoutDestroy(TextLayout layout);
da4619
void textLayoutDraw(TextLayout layout, double x, double y);
da4619
void textLayoutDrawFrom(TextLayout layout, double x, double y, int start);
da4619
void textLayoutDrawSubstr(TextLayout layout, double x, double y, int start, int length);
da4619
double textLayoutGetWidth(TextLayout layout);
da4619
double textLayoutGetHeight(TextLayout layout);
da4619
int textLayoutCursorUp(TextLayout layout, int cursor);
da4619
int textLayoutCursorDown(TextLayout layout, int cursor);
da4619
double textLayoutCursorGetX(TextLayout layout, int cursor);
da4619
double textLayoutCursorGetY(TextLayout layout, int cursor);
da4619
double textLayoutCursorGetHeight(TextLayout layout, int cursor);
da4619
f63775
f63775
#endif