Michael Fogleman

Projects AboutResumeMoreShop!

Go Graphics February 2016

4,170 Go 2D Graphics

Cairo-inspired 2D graphics library written in pure Go.

Go has an excellent set of image packages, but what do you do when you want to render 2D graphics? The golang freetype library implements nice anti-aliased rendering of paths, but is primarily for drawing text. So I built gg on top of it to provide a nice, general purpose 2D graphics API inspired by Cairo.

Features

  • Anti-aliased rendering
  • Fill and stroke paths
  • Draw images and text
  • Built-in word wrapping
  • Line caps, joins, dashes
  • Gradients and patterns
  • Transformation matrix
  • Push and pop context state
  • Clipping regions