fix tab/spaces
This commit is contained in:
@@ -45,15 +45,12 @@ font::load(void const *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
font::font() :
|
font::font() :
|
||||||
m_height(0),
|
|
||||||
m_width(0),
|
|
||||||
m_count(0),
|
m_count(0),
|
||||||
m_data(nullptr)
|
m_data(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
font::font(unsigned height, unsigned width, unsigned count, uint8_t const *data) :
|
font::font(unsigned height, unsigned width, unsigned count, uint8_t const *data) :
|
||||||
m_height(height),
|
m_size(width, height),
|
||||||
m_width(width),
|
|
||||||
m_count(count),
|
m_count(count),
|
||||||
m_data(data)
|
m_data(data)
|
||||||
{}
|
{}
|
||||||
@@ -63,8 +60,8 @@ font::draw_glyph(
|
|||||||
screen &s,
|
screen &s,
|
||||||
uint32_t glyph,
|
uint32_t glyph,
|
||||||
screen::pixel_t color,
|
screen::pixel_t color,
|
||||||
screen::coord_t x,
|
unsigned x,
|
||||||
screen::coord_t y) const
|
unsigned y) const
|
||||||
{
|
{
|
||||||
unsigned bwidth = (m_width+7)/8;
|
unsigned bwidth = (m_width+7)/8;
|
||||||
uint8_t const *data = m_data + (glyph * glyph_bytes());
|
uint8_t const *data = m_data + (glyph * glyph_bytes());
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ public:
|
|||||||
screen &s,
|
screen &s,
|
||||||
uint32_t glyph,
|
uint32_t glyph,
|
||||||
screen::pixel_t color,
|
screen::pixel_t color,
|
||||||
screen::coord_t x,
|
unsigned x,
|
||||||
screen::coord_t y) const;
|
unsigned y) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
font();
|
font();
|
||||||
|
|||||||
@@ -13,16 +13,17 @@ public:
|
|||||||
coord_t hres, coord_t vres,
|
coord_t hres, coord_t vres,
|
||||||
pixel_t rmask, pixel_t gmask, pixel_t bmask);
|
pixel_t rmask, pixel_t gmask, pixel_t bmask);
|
||||||
|
|
||||||
void fill(pixel_t color);
|
|
||||||
void draw_pixel(coord_t x, coord_t y, pixel_t color);
|
|
||||||
|
|
||||||
screen() = delete;
|
|
||||||
screen(const screen &) = delete;
|
void fill(pixel_t color);
|
||||||
|
void draw_pixel(unsigned x, unsigned y, pixel_t color);
|
||||||
|
|
||||||
struct color_masks {
|
struct color_masks {
|
||||||
pixel_t r, g, b;
|
pixel_t r, g, b;
|
||||||
color_masks(pixel_t r, pixel_t g, pixel_t b);
|
color_masks(pixel_t r, pixel_t g, pixel_t b);
|
||||||
};
|
};
|
||||||
|
screen() = delete;
|
||||||
|
screen(const screen &) = delete;
|
||||||
|
|
||||||
struct resolution {
|
struct resolution {
|
||||||
coord_t w, h;
|
coord_t w, h;
|
||||||
|
|||||||
Reference in New Issue
Block a user