Open cancerberoSgx opened 5 years ago
I'd be happy to include a pull request that makes the dependency optional.
The easy way to do it is to wrap specific code sections with #if openfl ... #end
in order to make them active only if the OpenFL library is included
The the part of outputting the image to a bitmap, that appears to be done here:
Adding a public method to the main Svg
class that merely returns the result of this rather than outputting to a Graphics object would be convenient.
Is it possible to use it without openfl since it's huge dependency for those using it in command line applications ? Can't it render to a RGBA 8-bit depth or similar image bitmap (in a type like Bytes) for example ? User is responsible to convert it to any image format he needs. This way the library get's agnostic from output format too which is more flexible, even for openfl users. Thanks