当前位置: 首页>>代码示例>>C++>>正文


C++ Rect::height方法代码示例

本文整理汇总了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);
    }
开发者ID:Strongc,项目名称:Chrome_Library,代码行数:30,代码来源:single_split_view.cpp

示例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);
}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:14,代码来源:ContentLayerDelegate.cpp

示例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()));
 }
开发者ID:Strongc,项目名称:Chrome_Library,代码行数:7,代码来源:rect.cpp

示例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());
}
开发者ID:leer168,项目名称:x-framework,代码行数:9,代码来源:browser_bubble.cpp

示例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);
 }
开发者ID:abyvaltsev,项目名称:putty-nd3.x,代码行数:10,代码来源:custom_frame_view.cpp

示例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());
        }
    }
开发者ID:abyvaltsev,项目名称:putty-nd3.x,代码行数:17,代码来源:label.cpp

示例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_;
 }
开发者ID:berkelium,项目名称:berkelium,代码行数:6,代码来源:BerkeliumRenderWidgetHostView.cpp

示例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;
 }
开发者ID:berkelium,项目名称:berkelium,代码行数:6,代码来源:BerkeliumRenderWidgetHostView.cpp


注:本文中的gfx::Rect::height方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。