Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Pycairo 1.10.0

    Download button

    No screenshots available
    Downloads: 2,401  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.0/5)
    19 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    James Henstridge, Steve Chaplin and Maarten Breddels | More programs
    LGPL / FREE
    April 19th, 2011, 02:52 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Pycairo description

    A set of Python bindings for the cairo graphics library.

    Pycairo is set of Python bindings for the cairo graphics library.

    About Cairo:

    Cairo is a software library used to provide a vector graphics�based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is designed to use hardware acceleration when available.

    Although written in C, there are bindings for using the cairo graphics library from many other programming languages, including Haskell, Java, Perl, Scheme, Smalltalk and several others. Dual licensed under the GNU Lesser General Public License and the Mozilla Public License, cairo is free software.

    This simple example draws a blue triangle into a png file.

    #!/usr/bin/env python

    import cairo

    WIDTH, HEIGHT = 400, 400

    # Setup Cairo
    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT)
    ctx = cairo.Context(surface)

    # Set thickness of brush
    ctx.set_line_width(15)

    # Draw out the triangle using absolute coordinates
    ctx.move_to(200, 100)
    ctx.line_to(300, 300)
    ctx.rel_line_to(-200, 0)
    ctx.close_path()

    # Apply the ink
    ctx.stroke()

    # Output a PNG file
    surface.write_to_png("triangle.png")


    Product's homepage

      


    TAGS:

    python binding | cairo wrapper | development library | python | cairo | binding

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM