本文整理汇总了C++中BasicShape::type方法的典型用法代码示例。如果您正苦于以下问题:C++ BasicShape::type方法的具体用法?C++ BasicShape::type怎么用?C++ BasicShape::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicShape
的用法示例。
在下文中一共展示了BasicShape::type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isExclusionShapeInsideInfoEnabledForRenderBlock
bool ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock(const RenderBlock* block)
{
// FIXME: Bug 89707: Enable shape inside for non-rectangular shapes
ExclusionShapeValue* shapeValue = block->style()->shapeInside();
BasicShape* shape = (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0;
return shape && (shape->type() == BasicShape::BASIC_SHAPE_RECTANGLE || shape->type() == BasicShape::BASIC_SHAPE_POLYGON);
}
示例2: canBlend
bool BasicShapeCircle::canBlend(const BasicShape& other) const
{
if (type() != other.type())
return false;
return radius().canBlend(downcast<BasicShapeCircle>(other).radius());
}
示例3:
bool BasicShapePath::operator==(const BasicShape& other) const
{
if (type() != other.type())
return false;
auto& otherPath = downcast<BasicShapePath>(other);
return m_windRule == otherPath.m_windRule && *m_byteStream == *otherPath.m_byteStream;
}
示例4: WTFMove
Ref<BasicShape> BasicShapeCircle::blend(const BasicShape& other, double progress) const
{
ASSERT(type() == other.type());
auto& otherCircle = downcast<BasicShapeCircle>(other);
auto result = BasicShapeCircle::create();
result->setCenterX(m_centerX.blend(otherCircle.centerX(), progress));
result->setCenterY(m_centerY.blend(otherCircle.centerY(), progress));
result->setRadius(m_radius.blend(otherCircle.radius(), progress));
return WTFMove(result);
}