Fortran vector graphics library (FIG)

Hello,

Over the last few months, I have been working on a vector graphics library written in Fortran. The library is now in a usable state and supports a variety of shapes, paths, and text, with output options including PNG, PPM, and SVG.

Features

  • Shape Drawing: Easily draw paths, shapes, and curves.

  • Styling: Apply stroking, dashing, and other styles to shapes.

  • Text Support: Render fonts and text with customizable attributes.

  • Export Options: Save your graphics in PNG, PPM, or SVG formats.

My future plans include continuing work on fig-plot in my free time. I aim to reach a state where you can create high-quality plots (2D plots, bar plots, and histograms) directly in Fortran. I will provide an update once I reach a significant milestone.

TODOs for fig

  • Additional Backend Support: Introduce an alternative backend to make Cairo an optional dependency. Although developing a pure Fortran backend is possible, it will require a lot of effort.

  • Gradients and Transformations

  • Graphics Driver Support: Integration a graphics driver like OpenGL.

I can’t wait to receive feedback on the library and look forward to potential contributions that will further improve the library.

A special thanks to @federicoperini, @everythingfunctional, and @Jweber for their invaluable assistance and encouragement throughout this journey. Their support was crucial in bringing this library to life.

tri_plot

25 Likes