bool Link::eq(const PathExpressionImpl &o) const { auto optr = static_cast<const Link*>(&o); return this->getLhs().getSet() == optr->getLhs().getSet() && this->getRhs().getSet() == optr->getRhs().getSet() && this->hasStencil() == optr->hasStencil() && (!this->hasStencil() || this->getStencil() == optr->getStencil()); }
void ClippingNode::setSquareStencil() { isSquareStencil = true; if(getStencil() == nullptr || dynamic_cast<DrawNode*>(getStencil()) == nullptr) { setStencil(DrawNode::create()); //addChild(getStencil()); //If you need to see what the stencil is like, for debug purpose } DrawNode* stencil = (DrawNode*)getStencil(); stencil->clear(); Vec2 rectangle[4]; rectangle[0] = Vec2(0, 0); rectangle[1] = Vec2(this->getContentSize().width / this->getScaleX(), 0); rectangle[2] = Vec2(this->getContentSize().width / this->getScaleX(), this->getContentSize().height / this->getScaleY()); rectangle[3] = Vec2(0, this->getContentSize().height / this->getScaleY()); Color4F white(1, 1, 1, 1); stencil->drawPolygon(rectangle, 4, white, 1, white); }
const libvisio::VSDShape *libvisio::VSDStencils::getStencilShape(unsigned pageId, unsigned shapeId) const { if (MINUS_ONE == pageId) return 0; const libvisio::VSDStencil *tmpStencil = getStencil(pageId); if (!tmpStencil) return 0; if (MINUS_ONE == shapeId) shapeId = tmpStencil->m_firstShapeId; return tmpStencil->getStencilShape(shapeId); }
std::vector<EdgeType> JigTile::getEdges() { TempShadow* shadow = static_cast<TempShadow*>( getStencil() ); return shadow->getEdgeType(); }
void CCBClippingNode::visit(){ CCNode* hock = this->getChildByTag(htag); if (hock==NULL) { getStencil()->setPosition(0, 0); getStencil()->setScaleX(1); getStencil()->setScaleY(1); getStencil()->setRotationX(0); getStencil()->setRotationY(0); getStencil()->setSkewX(0); getStencil()->setSkewY(0); getStencil()->setAnchorPoint(ccp(0.5, 0.5)); }else{ getStencil()->setPosition(hock->getPositionX(),hock->getPositionY()); getStencil()->setScaleX(hock->getScaleX()); getStencil()->setScaleY(hock->getScaleY()); getStencil()->setRotationX(hock->getRotationX()); getStencil()->setRotationY(hock->getRotationY()); getStencil()->setSkewX(hock->getSkewX()); getStencil()->setSkewY(hock->getSkewY()); getStencil()->setAnchorPoint(hock->getAnchorPoint()); } CCClippingNode::visit(); }