got it. ios really has no native support for svg.
PNG, JPG or PDF are what you will want to use.
For single color, one option is to use a font creation tool (there are many) that let you convert your svg to a svg font, then use svg2ttf to convert to a ttf font, which can be installed systemwide, or can be loaded temporarily in app. Then, you can create images from the glyphs. Not really worth it in my opinion...
Another option which looks promising but i have not explored yet: https://github.com/Kozea/CairoSVG can parse svg to produce a tree object, which then uses https://github.com/Kozea/cairocffi/ to convert to png. cairocffi might work without modification, or a small few, since it relies on ffi in a similar way that objc_util does, and i think the ios cairo is similar if not identical to the mac version. If not, you might also be able to use that tree to write your own output to ui.Path commands in an ui.ImageContext, and get_image provides the ui.Image.
A final option -- convert svg to vector PDF. I believe ui.Image.from_file can read pdf. I don't know hw they compare size wise.. some programs might add a lot of garbage to a pdf, ImageMagick probably would do it well.
counter = 10
while counter != 0:
bossfires = SpriteNode('spc:BoltBronze', parent=self)
bossfires.position = boss.position + (-50, 30)
bossfires.z_position = -1
b = random.uniform(10.0, 2500)
actions = [A.move_to(b, 100, 2 * 2), A.remove()]
counter = counter - 1```
This works but is not really "perfect" for me. But will look at what you suggested and see if I can use it.
@happy_variable try the following instead of __init__:
def __init__ (self, name, dration, from_brick):
In python, class methods (except the staticmethods or classmethods) are called with the instance of the class as the first argument.
EDIT: You will also need to replace SpriteNode.__setattr__(name, duration, from_brick) with SpriteNode.__setattr__(self, name, duration, from_brick).
This is because SpriteNode.__setattr__ is a unbound class method.