• Well, that was quite easy, thanks!

  • 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.

  • @omz thank you very much!!! Gonna try it

  • @ccc so sorry didn't see your whole response, That got it to work thank you very much!!!

  • @JonB Thank you for responding also. These are both very helpful options.

  • @flight_714

    Thanks for the tip. I did get it to work by using

    counter = 10 while counter != 0: Action.wait(2) self.items.append(boss) 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()] bossfires.run_action(A.sequence(actions)) self.bossfires.append(bossfires) Action.wait(2) 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.

Internal error.

Oops! Looks like something went wrong!