-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathZXMonospaceFont.h
34 lines (25 loc) · 911 Bytes
/
ZXMonospaceFont.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// ZX Graphics library, part of Another Graphics library
//
// Created by error on 27.01.18.
// Copyright © 2018 errorsoft. All rights reserved.
//
#ifndef ZXMonospaceFont_h
#define ZXMonospaceFont_h
#include "ZXGraphics.h"
#include "CXTypes.h"
typedef struct {
int width;
int height;
int cols;//|||
ZXBitmapRef bitmap;
} ZXMonospaceFont, *ZXMonospaceFontRef;
#define ZXFontBlack (RopAnd | RopSrcNot)
#define ZXFontWhite (RopOr)
#define ZXFontInvert (RopXor)
ZXMonospaceFontRef ZXMonospaceFontCreate(int symbolWidth, int symbolHeight, int cols, ZXConstData fontData);
void ZXMonospaceFontFree(ZXMonospaceFontRef font);
int ZXDrawText(ZXBitmapRef bitmap, ZXMonospaceFontRef font, int x, int y, const CXChar* text, unsigned char color);
int ZXTextWidth(ZXMonospaceFontRef font, const CXChar* text);
int ZXTextHeight(ZXMonospaceFontRef font);
#endif /* ZXMonospaceFont_h */