Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2015 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/11691be627d619066b8b to your computer and use it in GitHub Desktop.
Save anonymous/11691be627d619066b8b to your computer and use it in GitHub Desktop.
import CCairo
import Cairo
let surface = Surface(format: CAIRO_FORMAT_ARGB32, width: 421, height: 410)
surface.scale(10.0, y: 10.0)
surface.moveTo(29.0, y: 14.7)
surface.lineTo(37.6, y: 13.0)
surface.moveTo(37.6, y: 13.0)
surface.lineTo(30.4, y: 22.2)
surface.moveTo(30.4, y: 22.2)
surface.lineTo(29.0, y: 14.7)
surface.setLineWidth(0.1)
surface.stroke()
surface.surfaceWriteToPNG("test.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment