Lines Matching refs:from

42 static void _copyStyle(SvgStyleProperty* to, const SvgStyleProperty* from)  in _copyStyle()  argument
44 if (from == nullptr) return; in _copyStyle()
46 if ((from->curColorSet && !(to->flags & SvgStyleFlags::Color)) || in _copyStyle()
47 _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Color)) { in _copyStyle()
48 to->color = from->color; in _copyStyle()
51 if (from->flagsImportance & SvgStyleFlags::Color) { in _copyStyle()
55 if (((from->flags & SvgStyleFlags::PaintOrder) && !(to->flags & SvgStyleFlags::PaintOrder)) || in _copyStyle()
56 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::PaintOrder)) { in _copyStyle()
57 to->paintOrder = from->paintOrder; in _copyStyle()
59 if (from->flagsImportance & SvgStyleFlags::PaintOrder) { in _copyStyle()
63 if (((from->flags & SvgStyleFlags::Display) && !(to->flags & SvgStyleFlags::Display)) || in _copyStyle()
64 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Display)) { in _copyStyle()
65 to->display = from->display; in _copyStyle()
67 if (from->flagsImportance & SvgStyleFlags::Display) { in _copyStyle()
72 if (((from->fill.flags & SvgFillFlags::Paint) && !(to->flags & SvgStyleFlags::Fill)) || in _copyStyle()
73 _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Fill)) { in _copyStyle()
74 to->fill.paint.color = from->fill.paint.color; in _copyStyle()
75 to->fill.paint.none = from->fill.paint.none; in _copyStyle()
76 to->fill.paint.curColor = from->fill.paint.curColor; in _copyStyle()
77 if (from->fill.paint.url) { in _copyStyle()
79 to->fill.paint.url = strdup(from->fill.paint.url); in _copyStyle()
83 if (from->flagsImportance & SvgStyleFlags::Fill) { in _copyStyle()
87 if (((from->fill.flags & SvgFillFlags::Opacity) && !(to->flags & SvgStyleFlags::FillOpacity)) || in _copyStyle()
88 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::FillOpacity)) { in _copyStyle()
89 to->fill.opacity = from->fill.opacity; in _copyStyle()
92 if (from->flagsImportance & SvgStyleFlags::FillOpacity) { in _copyStyle()
96 if (((from->fill.flags & SvgFillFlags::FillRule) && !(to->flags & SvgStyleFlags::FillRule)) || in _copyStyle()
97 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::FillRule)) { in _copyStyle()
98 to->fill.fillRule = from->fill.fillRule; in _copyStyle()
101 if (from->flagsImportance & SvgStyleFlags::FillRule) { in _copyStyle()
106 if (((from->stroke.flags & SvgStrokeFlags::Paint) && !(to->flags & SvgStyleFlags::Stroke)) || in _copyStyle()
107 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Stroke)) { in _copyStyle()
108 to->stroke.paint.color = from->stroke.paint.color; in _copyStyle()
109 to->stroke.paint.none = from->stroke.paint.none; in _copyStyle()
110 to->stroke.paint.curColor = from->stroke.paint.curColor; in _copyStyle()
111 if (from->stroke.paint.url) { in _copyStyle()
113 to->stroke.paint.url = strdup(from->stroke.paint.url); in _copyStyle()
117 if (from->flagsImportance & SvgStyleFlags::Stroke) { in _copyStyle()
121 …if (((from->stroke.flags & SvgStrokeFlags::Opacity) && !(to->flags & SvgStyleFlags::StrokeOpacity)… in _copyStyle()
122 …_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::StrokeOpacity))… in _copyStyle()
123 to->stroke.opacity = from->stroke.opacity; in _copyStyle()
126 if (from->flagsImportance & SvgStyleFlags::StrokeOpacity) { in _copyStyle()
130 … if (((from->stroke.flags & SvgStrokeFlags::Width) && !(to->flags & SvgStyleFlags::StrokeWidth)) || in _copyStyle()
131 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::StrokeWidth)) { in _copyStyle()
132 to->stroke.width = from->stroke.width; in _copyStyle()
135 if (from->flagsImportance & SvgStyleFlags::StrokeWidth) { in _copyStyle()
139 …if (((from->stroke.flags & SvgStrokeFlags::Dash) && !(to->flags & SvgStyleFlags::StrokeDashArray))… in _copyStyle()
140 …_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::StrokeDashArray… in _copyStyle()
141 if (from->stroke.dash.array.count > 0) { in _copyStyle()
143 to->stroke.dash.array.reserve(from->stroke.dash.array.count); in _copyStyle()
144 for (uint32_t i = 0; i < from->stroke.dash.array.count; ++i) { in _copyStyle()
145 to->stroke.dash.array.push(from->stroke.dash.array[i]); in _copyStyle()
149 if (from->flagsImportance & SvgStyleFlags::StrokeDashArray) { in _copyStyle()
154 … if (((from->stroke.flags & SvgStrokeFlags::Cap) && !(to->flags & SvgStyleFlags::StrokeLineCap)) || in _copyStyle()
155 …_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::StrokeLineCap))… in _copyStyle()
156 to->stroke.cap = from->stroke.cap; in _copyStyle()
159 if (from->flagsImportance & SvgStyleFlags::StrokeLineCap) { in _copyStyle()
163 …if (((from->stroke.flags & SvgStrokeFlags::Join) && !(to->flags & SvgStyleFlags::StrokeLineJoin)) … in _copyStyle()
164 …_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::StrokeLineJoin)… in _copyStyle()
165 to->stroke.join = from->stroke.join; in _copyStyle()
168 if (from->flagsImportance & SvgStyleFlags::StrokeLineJoin) { in _copyStyle()
174 if ((from->opacity < 255 && !(to->flags & SvgStyleFlags::Opacity)) || in _copyStyle()
175 … _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Opacity)) { in _copyStyle()
176 to->opacity = from->opacity; in _copyStyle()
178 if (from->flagsImportance & SvgStyleFlags::Opacity) { in _copyStyle()
189 void cssCopyStyleAttr(SvgNode* to, const SvgNode* from) in cssCopyStyleAttr() argument
192 if (from->transform && !(to->style->flags & SvgStyleFlags::Transform)) { in cssCopyStyleAttr()
195 *to->transform = *from->transform; in cssCopyStyleAttr()
200 _copyStyle(to->style, from->style); in cssCopyStyleAttr()
202 if (from->style->clipPath.url) { in cssCopyStyleAttr()
204 to->style->clipPath.url = strdup(from->style->clipPath.url); in cssCopyStyleAttr()
206 if (from->style->mask.url) { in cssCopyStyleAttr()
208 to->style->mask.url = strdup(from->style->mask.url); in cssCopyStyleAttr()