I know how to do this task on a normal SVG file but I'm using svgwrite
package in python 3.7 and I don't know how to do this. Sadly website documentation doesn't cover this topic accurately enough...
Here is the code I came up with and it won't work:
image.add(image.ellipse(center=(half_x, half_y), r=(340, 340), fill=line_color, cx=50, cy=50, rx=80, ry=60, stroke="rgb(255,255,255)", opacity=0.3, stroke_width="0.5", id="img-container"))
image.add(image.image(href="https://images.pexels.com/photos/799443/pexels-photo-799443.jpeg", insert=None, size=("100%","100%"), clip_path="img-container"))
I just want to have a circle image in my SVG file. if you know any better approach please let me know!
edit: Also when I want to use clipPath
i got below error:
ValueError: Invalid children 'image' for svg-element <clipPath>.