本文整理汇总了C++中rect::width方法的典型用法代码示例。如果您正苦于以下问题:C++ rect::width方法的具体用法?C++ rect::width怎么用?C++ rect::width使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rect
的用法示例。
在下文中一共展示了rect::width方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void draw ()
{
if (!inverted)
w->invert_colors ();
XFillRectangle (w->display, w->win, w->gc, box.ul.x, box.ul.y,
box.width (), box.height ());
w->default_colors ();
XDrawRectangle (w->display, w->win, w->gc, box.ul.x, box.ul.y,
box.width (), box.height ());
}
示例2: update_geometry
bool window::update_geometry( rect &r )
{
SetWindowPos( _hwnd, NULL, r.x(), r.y(), r.width(), r.height(),
SWP_NOOWNERZORDER | SWP_NOZORDER );
r = query_geometry();
return true;
}
示例3: glViewport
void OpenGL3RenderState::set_viewport(OpenGL3ContextState& state, const rect<int>& viewport) const
{
if (state.viewport == viewport)
return;
glViewport(viewport.ll().x(), viewport.ll().y(), viewport.width(), viewport.height());
state.viewport = viewport;
}
示例4:
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
}
示例5: reset_clip
void context::reset_clip( const rect &r )
{
glEnable( GL_SCISSOR_TEST );
glScissor( static_cast<GLint>( r.x() ),
static_cast<GLint>( _last_vp[3] - ( r.y() + r.height() ) ),
static_cast<GLsizei>( r.width() ),
static_cast<GLsizei>( r.height() ) );
}
示例6: initialize
inline void initialize(device_context* dc, rect pr)
{
dc_ = dc;
rect_ = pr = pr.normalize();
poffset_ = -pr.left_top();
prect_ = pr;
mask_ = nullptr;
canvas_ = std::make_shared<canvas_type>(pr.width(), pr.height());
}