Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

without openfl #67

Open
cancerberoSgx opened this issue Jul 6, 2019 · 2 comments
Open

without openfl #67

cancerberoSgx opened this issue Jul 6, 2019 · 2 comments

Comments

@cancerberoSgx
Copy link

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

@jgranick
Copy link
Member

jgranick commented Jul 9, 2019

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

@EliteMasterEric
Copy link

The the part of outputting the image to a bitmap, that appears to be done here:

public static function toBytes(inXML:Xml,?inFilter:ObjectFilter) : format.gfx.GfxBytes

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants