Lines Matching refs:to
42 static void _copyStyle(SvgStyleProperty* to, const SvgStyleProperty* from) in _copyStyle() argument
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()
49 to->curColorSet = true; in _copyStyle()
50 to->flags = (to->flags | SvgStyleFlags::Color); in _copyStyle()
52 to->flagsImportance = (to->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()
58 to->flags = (to->flags | SvgStyleFlags::PaintOrder); in _copyStyle()
60 to->flagsImportance = (to->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()
66 to->flags = (to->flags | SvgStyleFlags::Display); in _copyStyle()
68 to->flagsImportance = (to->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()
78 if (to->fill.paint.url) free(to->fill.paint.url); in _copyStyle()
79 to->fill.paint.url = strdup(from->fill.paint.url); in _copyStyle()
81 to->fill.flags = (to->fill.flags | SvgFillFlags::Paint); in _copyStyle()
82 to->flags = (to->flags | SvgStyleFlags::Fill); in _copyStyle()
84 to->flagsImportance = (to->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()
90 to->fill.flags = (to->fill.flags | SvgFillFlags::Opacity); in _copyStyle()
91 to->flags = (to->flags | SvgStyleFlags::FillOpacity); in _copyStyle()
93 to->flagsImportance = (to->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()
99 to->fill.flags = (to->fill.flags | SvgFillFlags::FillRule); in _copyStyle()
100 to->flags = (to->flags | SvgStyleFlags::FillRule); in _copyStyle()
102 to->flagsImportance = (to->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()
112 if (to->stroke.paint.url) free(to->stroke.paint.url); in _copyStyle()
113 to->stroke.paint.url = strdup(from->stroke.paint.url); in _copyStyle()
115 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Paint); in _copyStyle()
116 to->flags = (to->flags | SvgStyleFlags::Stroke); in _copyStyle()
118 to->flagsImportance = (to->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()
124 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Opacity); in _copyStyle()
125 to->flags = (to->flags | SvgStyleFlags::StrokeOpacity); in _copyStyle()
127 to->flagsImportance = (to->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()
133 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Width); in _copyStyle()
134 to->flags = (to->flags | SvgStyleFlags::StrokeWidth); in _copyStyle()
136 to->flagsImportance = (to->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()
142 to->stroke.dash.array.clear(); in _copyStyle()
143 to->stroke.dash.array.reserve(from->stroke.dash.array.count); in _copyStyle()
145 to->stroke.dash.array.push(from->stroke.dash.array[i]); in _copyStyle()
147 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Dash); in _copyStyle()
148 to->flags = (to->flags | SvgStyleFlags::StrokeDashArray); in _copyStyle()
150 to->flagsImportance = (to->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()
157 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Cap); in _copyStyle()
158 to->flags = (to->flags | SvgStyleFlags::StrokeLineCap); in _copyStyle()
160 to->flagsImportance = (to->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()
166 to->stroke.flags = (to->stroke.flags | SvgStrokeFlags::Join); in _copyStyle()
167 to->flags = (to->flags | SvgStyleFlags::StrokeLineJoin); in _copyStyle()
169 to->flagsImportance = (to->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()
177 to->flags = (to->flags | SvgStyleFlags::Opacity); in _copyStyle()
179 to->flagsImportance = (to->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()
193 to->transform = (Matrix*)malloc(sizeof(Matrix)); in cssCopyStyleAttr()
194 if (to->transform) { in cssCopyStyleAttr()
195 *to->transform = *from->transform; in cssCopyStyleAttr()
196 to->style->flags = (to->style->flags | SvgStyleFlags::Transform); in cssCopyStyleAttr()
200 _copyStyle(to->style, from->style); in cssCopyStyleAttr()
203 if (to->style->clipPath.url) free(to->style->clipPath.url); in cssCopyStyleAttr()
204 to->style->clipPath.url = strdup(from->style->clipPath.url); in cssCopyStyleAttr()
207 if (to->style->mask.url) free(to->style->mask.url); in cssCopyStyleAttr()
208 to->style->mask.url = strdup(from->style->mask.url); in cssCopyStyleAttr()