File: cmodulelib.c

package info (click to toggle)
pycairo 1.27.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,984 kB
  • sloc: ansic: 8,873; python: 3,688; makefile: 32; sh: 4
file content (14 lines) | stat: -rw-r--r-- 321 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <Python.h>
#define PYCAIRO_NO_IMPORT
#include <py3cairo.h>
#include "cmodulelib.h"

PyObject *
create_image_surface (PyObject *self, PyObject *args)
{
    cairo_surface_t *surface;

    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);

    return PycairoSurface_FromSurface (surface, NULL);
}