bool BasicShapeEllipse::canBlend(const BasicShape& other) const { if (type() != other.type()) return false; auto& otherEllipse = downcast<BasicShapeEllipse>(other); return radiusX().canBlend(otherEllipse.radiusX()) && radiusY().canBlend(otherEllipse.radiusY()); }
TextStream& SVGFEMorphology::externalRepresentation(TextStream& ts) const { ts << "[type=MORPHOLOGY-OPERATOR] "; SVGFilterEffect::externalRepresentation(ts); ts << " [operator type=" << morphologyOperator() << "]" << " [radius x=" << radiusX() << " y=" << radiusY() << "]"; return ts; }
TextStream& FEMorphology::externalRepresentation(TextStream& ts, int indent) const { writeIndent(ts, indent); ts << "[feMorphology"; FilterEffect::externalRepresentation(ts); ts << " operator=\"" << morphologyOperator() << "\" " << "radius=\"" << radiusX() << ", " << radiusY() << "\"]\n"; m_in->externalRepresentation(ts, indent + 1); return ts; }
tikz::Value Style::radiusY() const { if (propertySet(s_radiusY)) { return d->radiusY; } auto style = parentStyle().entity<Style>(); if (style) { return style->radiusY(); } return 0.0_cm; }
PassRefPtr<FilterEffect> SVGFEMorphologyElement::build(SVGFilterBuilder* filterBuilder) { FilterEffect* input1 = filterBuilder->getEffectById(in1()); float xRadius = radiusX(); float yRadius = radiusY(); if (!input1) return 0; if (xRadius < 0 || yRadius < 0) return 0; return FEMorphology::create(input1, static_cast<MorphologyOperatorType>(_operator()), xRadius, yRadius); }
bool SVGFEMorphologyElement::build(SVGResourceFilter* filterResource) { FilterEffect* input1 = filterResource->builder()->getEffectById(in1()); if (!input1) return false; RefPtr<FilterEffect> effect = FEMorphology::create(input1, static_cast<MorphologyOperatorType>(_operator()), radiusX(), radiusY()); filterResource->addFilterEffect(this, effect.release()); return true; }
QJsonObject Style::saveData() const { QJsonObject json = Entity::saveData(); json["parentStyle"] = parentStyle().isValid() ? parentStyle().entity<Style>()->uid().toString() : Uid().toString(); if (penColorSet()) { json["penColor"] = penColor().name(); } if (fillColorSet()) { json["fillColor"] = fillColor().name(); } if (penOpacitySet()) { json["penOpacity"] = penOpacity(); } if (fillOpacitySet()) { json["fillOpacity"] = fillOpacity(); } if (penStyleSet()) { json["penStyle"] = toString(penStyle()); } if (lineWidthSet()) { json["lineWidth"] = lineWidth().toString(); } // FIXME line type if (doubleLineSet()) { json["doubleLine"] = doubleLine(); } if (innerLineWidthSet()) { json["innerLineWidth"] = innerLineWidth().toString(); } if (innerLineColorSet()) { json["innerLineColor"] = innerLineColor().name(); } if (rotationSet()) { json["rotation"] = rotation(); } if (radiusXSet()) { json["radiusX"] = radiusX().toString(); } if (radiusYSet()) { json["radiusY"] = radiusY().toString(); } if (bendAngleSet()) { json["bendAngle"] = bendAngle(); } if (loosenessSet()) { json["looseness"] = looseness(); } if (outAngleSet()) { json["outAngle"] = outAngle(); } if (inAngleSet()) { json["inAngle"] = inAngle(); } if (arrowTailSet()) { json["arrowTail"] = toString(arrowTail()); } if (arrowHeadSet()) { json["arrowHead"] = toString(arrowHead()); } if (shortenStartSet()) { json["shortenStart"] = shortenStart().toString(); } if (shortenEndSet()) { json["shortenEnd"] = shortenEnd().toString(); } if (textAlignSet()) { json["textAlign"] = toString(textAlign()); } if (shapeSet()) { json["shape"] = toString(shape()); } if (minimumWidthSet()) { json["minimumWidth"] = minimumWidth().toString(); } if (minimumHeightSet()) { json["minimumHeight"] = minimumHeight().toString(); } if (innerSepSet()) { json["innerSep"] = innerSep().toString(); } if (outerSepSet()) { json["outerSep"] = outerSep().toString(); } return json; }