本文整理汇总了C++中FrameView::contentsToScreen方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::contentsToScreen方法的具体用法?C++ FrameView::contentsToScreen怎么用?C++ FrameView::contentsToScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameView
的用法示例。
在下文中一共展示了FrameView::contentsToScreen方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: imageFitsInWindow
bool ImageDocument::imageFitsInWindow() const
{
if (!m_imageElement)
return true;
FrameView* view = frame()->view();
if (!view)
return true;
IntSize imageSize = m_imageElement->cachedImage()->imageSize(pageZoomFactor(this));
IntRect windowRect = view->contentsToScreen(view->actualVisibleContentRect());
return imageSize.width() <= windowRect.width() && imageSize.height() <= windowRect.height();
}
示例2: rectOnScreen
HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::rectOnScreen(
/* [retval][out] */ LPRECT rect)
{
ASSERT(is<HTMLInputElement>(m_element));
rect->left = rect->top = rect->right = rect->bottom = 0;
RenderObject* renderer = m_element->renderer();
FrameView* view = m_element->document().view();
if (!renderer || !view)
return E_FAIL;
IntRect coreRect = view->contentsToScreen(renderer->absoluteBoundingBoxRect());
rect->left = coreRect.x();
rect->top = coreRect.y();
rect->right = coreRect.maxX();
rect->bottom = coreRect.maxY();
return S_OK;
}
示例3: contentsToAtk
static void contentsToAtk(AccessibilityObject* coreObject, AtkCoordType coordType, IntRect rect, gint* x, gint* y, gint* width = 0, gint* height = 0)
{
FrameView* frameView = coreObject->documentFrameView();
if (frameView) {
switch (coordType) {
case ATK_XY_WINDOW:
rect = frameView->contentsToWindow(rect);
break;
case ATK_XY_SCREEN:
rect = frameView->contentsToScreen(rect);
break;
}
}
if (x)
*x = rect.x();
if (y)
*y = rect.y();
if (width)
*width = rect.width();
if (height)
*height = rect.height();
}