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


C++ ShapeValue::type方法代码示例

本文整理汇总了C++中ShapeValue::type方法的典型用法代码示例。如果您正苦于以下问题:C++ ShapeValue::type方法的具体用法?C++ ShapeValue::type怎么用?C++ ShapeValue::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShapeValue的用法示例。


在下文中一共展示了ShapeValue::type方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: referenceBox

static inline CSSBoxType referenceBox(const ShapeValue& shapeValue)
{
    if (shapeValue.cssBox() == BoxMissing) {
        if (shapeValue.type() == ShapeValue::Image)
            return ContentBox;
        return MarginBox;
    }
    return shapeValue.cssBox();
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:9,代码来源:ShapeOutsideInfo.cpp

示例2: isEnabledFor

bool ShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
{
    ShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
    if (!shapeValue || shapeValue->type() != ShapeValue::Shape)
        return false;

    BasicShape* shape = shapeValue->shape();
    return shape && shape->type() != BasicShape::BasicShapeInsetRectangleType;
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:9,代码来源:ShapeInsideInfo.cpp

示例3: ASSERT

const Shape* ShapeInfo<RenderType, shapeGetter, intervalGetter>::computedShape() const
{
    if (Shape* shape = m_shape.get())
        return shape;

    ShapeValue* shapeValue = (m_renderer->style()->*shapeGetter)();
    BasicShape* shape = (shapeValue && shapeValue->type() == ShapeValue::Shape) ? shapeValue->shape() : 0;

    ASSERT(shape);

    m_shape = Shape::createShape(shape, LayoutSize(m_shapeLogicalWidth, m_shapeLogicalHeight), m_renderer->style()->writingMode(), m_renderer->style()->shapeMargin(), m_renderer->style()->shapePadding());
    ASSERT(m_shape);
    return m_shape.get();
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:14,代码来源:ShapeInfo.cpp

示例4: isEnabledFor

bool ShapeOutsideInfo::isEnabledFor(const RenderBox& box)
{
    ShapeValue* shapeValue = box.style().shapeOutside();
    if (!box.isFloating() || !shapeValue)
        return false;

    switch (shapeValue->type()) {
    case ShapeValue::Shape: return shapeValue->shape();
    case ShapeValue::Image: return shapeValue->isImageValid() && checkShapeImageOrigin(box.document(), *(shapeValue->image()));
    case ShapeValue::Box: return true;
    }

    ASSERT_NOT_REACHED();
    return false;
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:15,代码来源:ShapeOutsideInfo.cpp

示例5: isEnabledFor

bool ShapeOutsideInfo::isEnabledFor(const RenderBox* box)
{
    ShapeValue* shapeValue = box->style().shapeOutside();
    if (!box->isFloating() || !shapeValue)
        return false;

    switch (shapeValue->type()) {
    case ShapeValue::Shape:
        return shapeValue->shape();
    case ShapeValue::Image:
        return shapeValue->isImageValid() && checkShapeImageOrigin(box->document(), *(shapeValue->image()->cachedImage()));
    default:
        return false;
    }
}
开发者ID:jeremysjones,项目名称:webkit,代码行数:15,代码来源:ShapeOutsideInfo.cpp

示例6: isEnabledFor

bool ShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
{
    ShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
    if (!shapeValue)
        return false;

    switch (shapeValue->type()) {
    case ShapeValue::Shape:
        return shapeValue->shape() && shapeValue->shape()->type() != BasicShape::BasicShapeInsetRectangleType && shapeValue->shape()->type() != BasicShape::BasicShapeInsetType;
    case ShapeValue::Image:
        return shapeValue->isImageValid() && checkShapeImageOrigin(renderer->document(), *(shapeValue->image()->cachedImage()));
    case ShapeValue::Box:
        return true;
    case ShapeValue::Outside:
        return false;
    }

    return false;
}
开发者ID:glenkim-dev,项目名称:blink-crosswalk,代码行数:19,代码来源:ShapeInsideInfo.cpp


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