本文整理汇总了C++中gfx::Rect::height方法的典型用法代码示例。如果您正苦于以下问题:C++ Rect::height方法的具体用法?C++ Rect::height怎么用?C++ Rect::height使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gfx::Rect
的用法示例。
在下文中一共展示了Rect::height方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DidChangeBounds
void SingleSplitView::DidChangeBounds(const gfx::Rect& previous,
const gfx::Rect& current)
{
if(resize_leading_on_bounds_change_)
{
// We do not update divider_offset_ on minimize (to zero) and on restore
// (to largest value). As a result we get back to the original value upon
// window restore.
bool is_minimize_or_restore = previous.height()==0 ||
current.height()==0;
if(!is_minimize_or_restore)
{
if(is_horizontal_)
{
divider_offset_ += (current.width() - previous.width()) / 2;
}
else
{
divider_offset_ += (current.height() - previous.height()) / 2;
}
if(divider_offset_ < 0)
{
divider_offset_ = kDividerSize;
}
}
}
View::DidChangeBounds(previous, current);
}
示例2: paintArtifactToWebDisplayItemList
static void paintArtifactToWebDisplayItemList(WebDisplayItemList* list, const PaintArtifact& artifact, const gfx::Rect& bounds)
{
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
// This is a temporary path to paint the artifact using the paint chunk
// properties. Ultimately, we should instead split the artifact into
// separate layers and send those to the compositor, instead of sending
// one big flat SkPicture.
SkRect skBounds = SkRect::MakeXYWH(bounds.x(), bounds.y(), bounds.width(), bounds.height());
RefPtr<SkPicture> picture = paintArtifactToSkPicture(artifact, skBounds);
list->appendDrawingItem(WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()), picture.get());
return;
}
artifact.appendToWebDisplayItemList(list);
}
示例3: SharesEdgeWith
bool Rect::SharesEdgeWith(const gfx::Rect& rect) const
{
return (y()==rect.y() && height()==rect.height() &&
(x()==rect.right() || right()==rect.x())) ||
(x()==rect.x() && width()==rect.width() &&
(y()==rect.bottom() || bottom()==rect.y()));
}
示例4: SetAbsoluteBounds
void BrowserBubble::SetAbsoluteBounds(const gfx::Rect& window_bounds)
{
// Convert screen coordinates to frame relative.
gfx::Point relative_origin = window_bounds.origin();
view::View::ConvertPointToView(NULL, frame_->GetRootView(),
&relative_origin);
SetBounds(relative_origin.x(), relative_origin.y(),
window_bounds.width(), window_bounds.height());
}
示例5: GetWindowBoundsForClientBounds
gfx::Rect CustomFrameView::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const
{
int top_height = NonClientTopBorderHeight();
int border_thickness = NonClientBorderThickness();
return gfx::Rect(std::max(0, client_bounds.x()-border_thickness),
std::max(0, client_bounds.y()-top_height),
client_bounds.width()+(2*border_thickness),
client_bounds.height()+top_height+border_thickness);
}
示例6: PaintText
void Label::PaintText(gfx::Canvas* canvas,
const std::wstring& text,
const gfx::Rect& text_bounds,
int flags)
{
canvas->DrawStringInt(text, font_, color_,
text_bounds.x(), text_bounds.y(),
text_bounds.width(), text_bounds.height(), flags);
if(HasFocus() || paint_as_focused_)
{
gfx::Rect focus_bounds = text_bounds;
focus_bounds.Inset(-kFocusBorderPadding, -kFocusBorderPadding);
canvas->DrawFocusRect(focus_bounds.x(), focus_bounds.y(),
focus_bounds.width(), focus_bounds.height());
}
}
示例7: GetViewBounds
virtual gfx::Rect GetViewBounds() const {
X;
fprintf(stderr, "GetViewBounds %d %d %d %d\n", bounds_.x(), bounds_.y(),
bounds_.width(), bounds_.height());
return bounds_;
}
示例8: SetBounds
virtual void SetBounds(const gfx::Rect& rect) {
X;
fprintf(stderr, "SetBounds %d %d %d %d\n", rect.x(), rect.y(),
rect.width(), rect.height());
bounds_ = rect;
}