本文整理汇总了C++中bitmap_rgb32::plot_box方法的典型用法代码示例。如果您正苦于以下问题:C++ bitmap_rgb32::plot_box方法的具体用法?C++ bitmap_rgb32::plot_box怎么用?C++ bitmap_rgb32::plot_box使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bitmap_rgb32
的用法示例。
在下文中一共展示了bitmap_rgb32::plot_box方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
UINT32 epson_lx810l_t::screen_update_lx810l(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int scrolly = -bitmap_line(9);
copyscrollbitmap(bitmap, m_bitmap, 0, nullptr, 1, &scrolly, cliprect);
/* draw "printhead" */
bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, 0x888888);
return 0;
}
示例2: screen_update
uint32_t mmagic_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
// draw playfield
for (int y = 0; y < 192 / 12; y++)
{
for (int x = 0; x < 256 / 8; x++)
{
uint8_t code = m_vram[(y * 32) + x] & 0x7f;
// normal palette 00..7f, alternate palette 80..ff
uint8_t color = m_colors[code | (BIT(m_color, 6) << 7)];
// draw one tile
for (int tx = 0; tx < 12; tx++)
{
uint8_t gfx = m_tiles[(code << 4) + tx];
bitmap.pix32(y * 12 + tx, x * 8 + 0) = BIT(gfx, 4) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 1) = BIT(gfx, 5) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 2) = BIT(gfx, 6) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 3) = BIT(gfx, 7) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 4) = BIT(gfx, 0) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 5) = BIT(gfx, 1) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 6) = BIT(gfx, 2) ? rgb_t::black() : m_palette->pen_color(color);
bitmap.pix32(y * 12 + tx, x * 8 + 7) = BIT(gfx, 3) ? rgb_t::black() : m_palette->pen_color(color);
}
}
}
// draw ball (if not disabled)
if (m_ball_x != 0xff)
{
static const int BALL_SIZE = 4;
int ball_y = (m_ball_y >> 4) * 12 + (m_ball_y & 0x0f);
bitmap.plot_box(m_ball_x - BALL_SIZE + 1, ball_y - BALL_SIZE + 1, BALL_SIZE, BALL_SIZE, rgb_t::white());
}
return 0;
}