add inverted text

This commit is contained in:
j3d1 2018-12-01 20:26:05 +01:00
parent 806fc7c3e5
commit 6091a40278
12 changed files with 88 additions and 93 deletions

View file

@ -29,6 +29,11 @@ public:
return ptr_[i*N/block_] & ((1<<N)-1) << (i*N%block_);
}
int getBlock(int i) {
if (i >= size_) return 0;
return ptr_[i*N/block_];
}
void set(int i, int v) {
if (i < size_) {
ptr_[i*N/block_] &= ~(((1<<N)-1) << (i*N%block_));

View file

@ -25,11 +25,11 @@ public:
void clear();
void draw(int x, int y);
void draw(int x, int y, bool inv = false);
void print(int x, int y, const char *str, font & = basic_5x4);
void print(int x, int y, const char *str, bool inv = 0, font & = basic_5x4);
void print(int x, int y, char *str, font & = basic_5x4);
void print(int x, int y, char *str, bool inv = 0, font & = basic_5x4);
int getWidth();

View file

@ -14,9 +14,9 @@ private:
raw_font& raw_data_;
public:
font(raw_font&);
void print(int x, int y, char c, canvas&);
void print(int x, int y, char* str, canvas&);
void print(int x, int y, const char* str, canvas&);
void print(int x, int y, char c, canvas&, bool inv = 0);
void print(int x, int y, char* str, canvas&, bool inv = 0);
void print(int x, int y, const char* str, canvas&, bool inv = 0);
};
#endif //MGL_DMXMENU_FONT_H