本文整理汇总了C++中rect::get_x_min方法的典型用法代码示例。如果您正苦于以下问题:C++ rect::get_x_min方法的具体用法?C++ rect::get_x_min怎么用?C++ rect::get_x_min使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rect
的用法示例。
在下文中一共展示了rect::get_x_min方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
RiscosGui::setInvalidatedRegion(const rect& bounds)
{
// Note: Bounds coordinates are in TWIPS
#ifdef RENDERER_AGG
// forward to renderer
_renderer->set_invalidated_region(bounds);
if (bounds.width() > 1e10f) {
// Region is entire screen. Don't convert to integer as this will
// overflow.
m_draw_minx = 0;
m_draw_miny = 0;
m_draw_maxx = _width - 1;
m_draw_maxy = _height - 1;
} else {
// remember for renderBuffer()
_renderer->world_to_pixel(&m_draw_minx, &m_draw_miny,
bounds.get_x_min(), bounds.get_y_min());
_renderer->world_to_pixel(&m_draw_maxx, &m_draw_maxy,
bounds.get_x_max(), bounds.get_y_max());
// add two pixels because of anti-aliasing...
m_draw_minx = valid_coord(m_draw_minx - 2, _width);
m_draw_miny = valid_coord(m_draw_miny - 2, _height);
m_draw_maxx = valid_coord(m_draw_maxx + 2, _width);
m_draw_maxy = valid_coord(m_draw_maxy + 2, _height);
}
// log_debug("DrawRect: (%i, %i), (%i, %i)\n",
// m_draw_minx, m_draw_miny, m_draw_maxx, m_draw_maxy);
#endif
}