@@ -392,7 +392,7 @@ open class SVGParser {
392
392
contentUserSpace = false
393
393
}
394
394
395
- let position = getPatternPosition ( element)
395
+ let place = getPatternPlace ( element)
396
396
397
397
var contentNode : Node ?
398
398
if pattern. children. isEmpty {
@@ -414,7 +414,7 @@ open class SVGParser {
414
414
}
415
415
416
416
if let contentNode = contentNode {
417
- return UserSpacePattern ( content: contentNode, bounds: bounds, viewBox: viewBox, userSpace: userSpace, contentUserSpace: contentUserSpace, position : position )
417
+ return UserSpacePattern ( content: contentNode, bounds: bounds, viewBox: viewBox, userSpace: userSpace, contentUserSpace: contentUserSpace, place : place )
418
418
}
419
419
return . none
420
420
}
@@ -439,7 +439,7 @@ open class SVGParser {
439
439
return parseTransformationAttribute ( transformAttribute)
440
440
}
441
441
442
- fileprivate func getPatternPosition ( _ element: SWXMLHash . XMLElement ) -> Transform {
442
+ fileprivate func getPatternPlace ( _ element: SWXMLHash . XMLElement ) -> Transform {
443
443
guard let transformAttribute = element. allAttributes [ " patternTransform " ] ? . text else {
444
444
return . identity
445
445
}
@@ -692,14 +692,14 @@ open class SVGParser {
692
692
fileprivate func getPatternFill( pattern: UserSpacePattern , locus: Locus ? ) -> Pattern {
693
693
if pattern. userSpace == false && pattern. contentUserSpace == true {
694
694
let tranform = BoundsUtils . transformForLocusInRespectiveCoords ( respectiveLocus: pattern. bounds, absoluteLocus: locus!)
695
- return Pattern ( content: pattern. content, bounds: pattern. bounds. applying ( tranform) , viewBox: pattern. viewBox, userSpace: true , position : pattern. position )
695
+ return Pattern ( content: pattern. content, bounds: pattern. bounds. applying ( tranform) , viewBox: pattern. viewBox, userSpace: true , place : pattern. place )
696
696
}
697
697
if pattern. userSpace == true && pattern. contentUserSpace == false {
698
698
if let patternNode = BoundsUtils . createNodeFromRespectiveCoords ( respectiveNode: pattern. content, absoluteLocus: locus!) {
699
- return Pattern ( content: patternNode, bounds: pattern. bounds, viewBox: pattern. viewBox, userSpace: pattern. userSpace, position : pattern. position )
699
+ return Pattern ( content: patternNode, bounds: pattern. bounds, viewBox: pattern. viewBox, userSpace: pattern. userSpace, place : pattern. place )
700
700
}
701
701
}
702
- return Pattern ( content: pattern. content, bounds: pattern. bounds, viewBox: pattern. viewBox, userSpace: true , position : pattern. position )
702
+ return Pattern ( content: pattern. content, bounds: pattern. bounds, viewBox: pattern. viewBox, userSpace: true , place : pattern. place )
703
703
}
704
704
705
705
fileprivate func getStroke( _ styleParts: [ String : String ] , groupStyle: [ String : String ] = [ : ] ) -> Stroke ? {
@@ -1945,15 +1945,15 @@ fileprivate class UserSpacePattern {
1945
1945
let bounds : Rect
1946
1946
let userSpace : Bool
1947
1947
let contentUserSpace : Bool
1948
- let position : Transform
1948
+ let place : Transform
1949
1949
1950
- init ( content: Node , bounds: Rect , viewBox: Rect = Rect ( x: 0 , y: 0 , w: 0 , h: 0 ) , userSpace: Bool = false , contentUserSpace: Bool = true , position : Transform = . identity) {
1950
+ init ( content: Node , bounds: Rect , viewBox: Rect = Rect ( x: 0 , y: 0 , w: 0 , h: 0 ) , userSpace: Bool = false , contentUserSpace: Bool = true , place : Transform = . identity) {
1951
1951
self . viewBox = viewBox
1952
1952
self . content = content
1953
1953
self . bounds = bounds
1954
1954
self . userSpace = userSpace
1955
1955
self . contentUserSpace = contentUserSpace
1956
- self . position = position
1956
+ self . place = place
1957
1957
}
1958
1958
}
1959
1959
0 commit comments