func createElement()

in Cyborg/VectorDrawableParser.swift [697:714]


    func createElement(in viewportSize: CGSize) -> Result<GroupChild> {
        children.mapAllOrFail { parser in
            parser.createElement(in: viewportSize)
        }
        .flatMap { childElements in
            clipPaths
                .mapAllOrFail { $0.createElement() as Result<VectorDrawable.ClipPath> }
                .flatMap { clipPaths in
                    .ok(VectorDrawable.Group(name: groupName,
                                             transform: Transform(pivot: .init(x: pivotX, y: pivotY),
                                                                  rotation: rotation,
                                                                  scale: .init(x: scaleX, y: scaleY),
                                                                  translation: .init(x: translationX, y: translationY)),
                                             children: childElements,
                                             clipPaths: clipPaths))
            }
        }
    }