Skip to content

ysoftware/svgrastr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple SVG rasterizer

This project is an example of using foreign code in Jai. Compatible with compiler version beta 0.2.016.

The final executable is statically linked with a single-header C library, that is being initially created by a C compiler:

cc:
nanosvg.h & nanosvgrast.h > nanosvg.c > nanosvg.o

ar:
nanosvg.o > libnanosvg.a

jai:
main.jai & libnanosvg.a > svgrastr

Build and run:

jai first.jai

./svgrastr -help
----- Here is the list of valid arguments: -----
    -i: SVG input file path
    -o: PNG output file path
    -w: Output file width
    -h: Output file height

    -help, -HELP, -?: Show the list of commands.

./svgrastr -i assets/cog.svg -o cog.png -w 120 -h 120
File written: cog.png

Tools

  • jai
  • cc
  • ar

Dependencies:

About

Jai usage example of a foreign c library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published