本文整理汇总了C++中dom::DocumentImpl::logicalDpiY方法的典型用法代码示例。如果您正苦于以下问题:C++ DocumentImpl::logicalDpiY方法的具体用法?C++ DocumentImpl::logicalDpiY怎么用?C++ DocumentImpl::logicalDpiY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dom::DocumentImpl
的用法示例。
在下文中一共展示了DocumentImpl::logicalDpiY方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resolutionMediaFeatureEval
static bool resolutionMediaFeatureEval(CSSValueImpl* value, RenderStyle*, KHTMLPart* part, MediaFeaturePrefix op)
{
DOM::DocumentImpl *d = static_cast<DOM::DocumentImpl*>(part->document().handle());
int logicalDpiY = d ? d->logicalDpiY() : 0;
if (value && logicalDpiY)
return value->isPrimitiveValue() && compareValue(logicalDpiY, static_cast<CSSPrimitiveValueImpl*>(value)->getDPIResolution(), op);
return logicalDpiY != 0;
}
示例2: heightMediaFeatureEval
static bool heightMediaFeatureEval(CSSValueImpl* value, RenderStyle* style, KHTMLPart* part, MediaFeaturePrefix op)
{
KHTMLPart* rootPart = part;
while (rootPart->parentPart()) rootPart = rootPart->parentPart();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(rootPart->document().handle());
QPaintDevice *pd = doc->paintDevice();
bool printing = pd ? (pd->devType() == QInternal::Printer) : false;
int height;
if (printing)
height = pd->height();
else {
height = part->view()->visibleHeight();
doc = static_cast<DOM::DocumentImpl*>(part->document().handle());
}
int logicalDpiY = doc->logicalDpiY();
if (value)
return value->isPrimitiveValue() && compareValue(height, static_cast<CSSPrimitiveValueImpl*>(value)->computeLength(style, logicalDpiY), op);
return height > 0;
}
示例3: device_widthMediaFeatureEval
static bool device_widthMediaFeatureEval(CSSValueImpl* value, RenderStyle* style, KHTMLPart* part, MediaFeaturePrefix op)
{
if (value) {
KHTMLPart* rootPart = part;
while (rootPart->parentPart()) rootPart = rootPart->parentPart();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(rootPart->document().handle());
QPaintDevice *pd = doc->paintDevice();
bool printing = pd ? (pd->devType() == QInternal::Printer) : false;
int width;
if (printing)
width = pd->width();
else {
width = QApplication::desktop()->screen(QApplication::desktop()->screenNumber( rootPart->view() ))->rect().width();
doc = static_cast<DOM::DocumentImpl*>(part->document().handle());
}
int logicalDpiY = doc->logicalDpiY();
return value->isPrimitiveValue() && compareValue(width, static_cast<CSSPrimitiveValueImpl*>(value)->computeLength(style,logicalDpiY), op);
}
// ({,min-,max-}device-width)
// assume if we have a device, assume non-zero
return true;
}
示例4: widthMediaFeatureEval
static bool widthMediaFeatureEval(CSSValueImpl *value, RenderStyle *style, KHTMLPart *part, MediaFeaturePrefix op)
{
KHTMLPart *rootPart = part;
while (rootPart->parentPart()) {
rootPart = rootPart->parentPart();
}
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(rootPart->document().handle());
QPaintDevice *pd = doc->paintDevice();
bool printing = pd ? (pd->devType() == QInternal::Printer) : false;
int width;
if (printing) {
width = pd->width();
} else {
width = part->view()->visibleWidth();
doc = static_cast<DOM::DocumentImpl *>(part->document().handle());
}
int logicalDpiY = doc->logicalDpiY();
if (value) {
return value->isPrimitiveValue() && compareValue(width, static_cast<CSSPrimitiveValueImpl *>(value)->computeLength(style, style, logicalDpiY), op);
}
return width > 0;
}