Questions tagged [pocketsvg]
6 questions
1
vote
1 answer
How to access attributes of a SVG resource using PocketSVG?
I have been trying to use PocketSVG to parse SVG resources. Using PocketSVG, I can easily parse all the paths of the SVG and the path attributes too. Following https://stackoverflow.com/a/40683062/3939807 answer, here is the sample code I have…

Rubaiyat Jahan Mumu
- 3,887
- 1
- 33
- 35
0
votes
0 answers
How to update path coordinates in a svg image swift
I have a svg image, when i touch the image i get the shapeLayer selected and I change its color but when i transform the image to move it in the device i need to touch the original position to detect the shapeLayer. I'm using PocketSVG.
This is my…

Victor
- 9
- 2
0
votes
0 answers
How to parse Text element in SVG swift?
I am using PocketSVG, SwiftSVG and SVGKit libraries to parse SVG elements and convert into CALayer. But I don't know how to parse Text element and its attributes from SVG in swift.
I want to get My Text string from below SVG text element. How can I…

Ali Akbar
- 7
- 5
0
votes
4 answers
Draw rectangle around CAShape Layer
I am new in Swift and also in Core Animation. I want to create rectangle box around CAShapeLayer just like in this image, but I don't know.
In detail, I am parsing SVG image through PocketSVG and convert it's UIBezierPath into CAShapeLayer and after…

Ali Akbar
- 7
- 5
0
votes
2 answers
How to fit CAShape Layer to UIImage View?
I am parsing SVG image file and convert it paths into CAShapeLayer, after that I am adding this CAShapeLayer to UIImage View's layer.
It's work fine, but the problem is that it does not fit to the UIImage View.
That's output.
Image 1.
That's code of…

Ali Akbar
- 7
- 5
-1
votes
1 answer
How to adjust CALayer size in order to fit the parent view
I created a layered view (SVGImageView using PocketSVG) that has the same size as parent:
var body: some View {
GeometryReader { reader in
SVGImageLayered("world", width: reader.size.width, height: reader.size.height)
…

Niko Gamulin
- 66,025
- 95
- 221
- 286