Skip to content
/ HxSvg Public

Work-in-progress proof-of-concept SVG library for Haxe. Based on NME/OpenFL svg solutions, but decoupled from flash drawing api. Runs on C# and Java targets. Can be used for Cairo rendering.

Notifications You must be signed in to change notification settings

cambiata/HxSvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HxSvg

Work-in-progress proof-of-concept SVG library for Haxe. Based on NME/OpenFL svg solutions, but decoupled from flash drawing api. Runs on all major Haxe targets, including C# and Java.

The SVG graphic information is abstracted to a list of graphic commands:

enum GraphicCommand
{
	size(inWidth:Float, inHeight:Float);
	beginGradientFill(grad:Gradient);
	beginFill(color:Int, alpha:Float);
	endFill;
	lineStyle(style:LineStyle);
	endLineStyle;
	moveTo(inX:Float, inY:Float);
	lineTo(inX:Float, inY:Float);
	curveTo(inCX:Float, inCY:Float, inX:Float, inY:Float);
	renderText(text:Text);
}

This can be interpreted/transformed for different targets. For example can cubic bezieer (used by flash drawing API) information be transformed to quadratic bezieers used by Cairo API.

Status

  • No actual rendering, except for experimental commands-to-cairo stuff.
  • Simple neko/cairo and C++/cairo examples - example-cairo/

Credits

  • Hugh Sanderson and Joshua Granick for all core code
  • Carlos Ballesteros Velasco for Haxe-Cairo

Screenshot

Actual pdf output from the commands-to-cairo renderer, using Haxe-Cairo:

  • screen

About

Work-in-progress proof-of-concept SVG library for Haxe. Based on NME/OpenFL svg solutions, but decoupled from flash drawing api. Runs on C# and Java targets. Can be used for Cairo rendering.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published