File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,14 @@ extension LayerTree.Builder {
213213 gradient. stops = makeGradientStops ( for: element)
214214 }
215215
216+ if element. gradientUnits == . userSpaceOnUse {
217+ gradient. units = . userSpaceOnUse
218+ }
219+
220+ guard gradient. stops. count > 1 else {
221+ return nil
222+ }
223+
216224 return gradient
217225 }
218226
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ extension LayerTree {
3535 var start : Point
3636 var end : Point
3737 var stops : [ Stop ]
38-
38+ var units : Units = . objectBoundingBox
39+
3940 init ( start: Point , end: Point ) {
4041 self . start = start
4142 self . end = end
@@ -60,5 +61,10 @@ extension LayerTree {
6061 self . opacity = opacity
6162 }
6263 }
64+
65+ enum Units {
66+ case userSpaceOnUse
67+ case objectBoundingBox
68+ }
6369 }
6470}
You can’t perform that action at this time.
0 commit comments