Esempio n. 1
0
// cairo_public void
// cairo_svg_surface_restrict_to_version (cairo_surface_t *surface,
//                        cairo_svg_version_t  	 version);
static int l_cairo_svg_surface_restrict_to_version(lua_State* L)
{
    cairo_surface_t *surface = get_cairo_surface_t (L, 1);
    cairo_svg_version_t version = (cairo_svg_version_t) luaL_checkinteger(L, 2);
    cairo_svg_surface_restrict_to_version (surface, version);
    return 0;
}
Esempio n. 2
0
// cairo_public void
// cairo_ps_surface_restrict_to_level (cairo_surface_t    *surface,
//                                     cairo_ps_level_t    level);
static int l_cairo_ps_surface_restrict_to_level(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    cairo_ps_level_t level = (cairo_ps_level_t)luaL_checkinteger(L, 2);
    cairo_ps_surface_restrict_to_level (surface, level);
    return 0;
}
Esempio n. 3
0
// cairo_public void
// cairo_ps_surface_set_eps (cairo_surface_t	*surface,
//               cairo_bool_t           eps);
static int l_cairo_ps_surface_set_eps(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    cairo_bool_t eps = (cairo_bool_t)luaL_checkinteger(L, 2);
    cairo_ps_surface_set_eps (surface, eps);
    return 0;
}
Esempio n. 4
0
// cairo_public void
// cairo_ps_surface_dsc_comment (cairo_surface_t	*surface,
//                   const char	*comment);
static int l_cairo_ps_surface_dsc_comment(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    const char *comment = luaL_checkstring(L, 2);
    cairo_ps_surface_dsc_comment (surface, comment);
    return 0;
}
Esempio n. 5
0
// cairo_public cairo_bool_t
// cairo_ps_surface_get_eps (cairo_surface_t	*surface);
static int l_cairo_ps_surface_get_eps(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    cairo_bool_t v = cairo_ps_surface_get_eps (surface);
    lua_pushboolean(L, v);
    return 1;
}
Esempio n. 6
0
// cairo_public void
// cairo_os2_surface_set_manual_window_refresh (cairo_surface_t *surface,
//                                              cairo_bool_t     manual_refresh);
static int l_cairo_os2_surface_set_manual_window_refresh(lua_State* L)
{
    cairo_surface_t *surface = get_cairo_surface_t (L, 1);
    cairo_bool_t manual_refresh = (cairo_bool_t) luaL_checkinteger(L, 2);
    cairo_os2_surface_set_manual_window_refresh (surface, manual_refresh);
    return 0;
}
Esempio n. 7
0
// cairo_public cairo_bool_t
// cairo_os2_surface_get_manual_window_refresh (cairo_surface_t *surface);
static int l_cairo_os2_surface_get_manual_window_refresh(lua_State* L)
{
    cairo_surface_t *surface = get_cairo_surface_t (L, 1);
    cairo_bool_t v = cairo_os2_surface_get_manual_window_refresh (surface);
    lua_pushboolean(L, v);
    return 1;
}
Esempio n. 8
0
// cairo_public void
// cairo_ps_surface_set_size (cairo_surface_t	*surface,
//                double		 width_in_points,
//                double		 height_in_points);
static int l_cairo_ps_surface_set_size(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    double width_in_points = luaL_checknumber(L, 2);
    double height_in_points = luaL_checknumber(L, 3);
    cairo_ps_surface_set_size (surface, width_in_points, height_in_points);
    return 0;
}
static int new_SurfacePattern (lua_State *L)
{
    lua_remove(L, 1); // remove cairo.SurfacePattern

    //{"create_for_surface",               l_cairo_pattern_create_for_surface},
    cairo_surface_t *surface = get_cairo_surface_t (L, 1);
    cairo_pattern_t *cp = cairo_pattern_create_for_surface (surface);

    return new_Pattern(L, LUACAIRO ".SurfacePattern.mt", cp, CAIRO_PATTERN_TYPE_SURFACE, 1);
}
Esempio n. 10
0
// cairo_public int
// cairo_os2_surface_set_size (cairo_surface_t *surface,
//                             int              new_width,
//                             int              new_height,
//                             int              timeout);
static int l_cairo_os2_surface_set_size(lua_State* L)
{
    cairo_surface_t *surface = get_cairo_surface_t (L, 1);
    int new_width = luaL_checkinteger(L, 2);
    int new_height = luaL_checkinteger(L, 3);
    int timeout = luaL_checkinteger(L, 4);
    int v = cairo_os2_surface_set_size (surface, new_width, new_height, timeout);
    lua_pushinteger(L, v);
    return 1;
}
Esempio n. 11
0
static int new_Context (lua_State *L)
{
    lua_remove(L, 1); // remove cairo.Context

  //{"create",                                   l_cairo_create},
    cairo_surface_t* target = get_cairo_surface_t (L, 1);
    cairo_t *cr = cairo_create(target);

    Context *o = (Context *) lua_newuserdata(L, sizeof(Context));
    o->cr_     = cr;
    o->havecr_ = 1;

    luaL_getmetatable(L, LUACAIRO ".Context.mt");
    lua_setmetatable(L, -2);

    return 1;
}
Esempio n. 12
0
static int new_Device (lua_State *L)
{
    cairo_surface_t *surface;
    cairo_device_t *dev;
    Device *o;

    lua_remove(L, 1); // remove cairo.Device

    // cairo_public cairo_device_t *
    // cairo_surface_get_device (cairo_surface_t *surface);
    surface = get_cairo_surface_t (L, 1);
    dev = cairo_surface_get_device (surface);
    
    o = (Device *) lua_newuserdata(L, sizeof(Device));
    o->dev_     = dev;
    o->havedev_ = 1;

    luaL_getmetatable(L, LUACAIRO ".Device.mt");
    lua_setmetatable(L, -2);

    return 1;
}
Esempio n. 13
0
// cairo_public void
// cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface);
static int l_cairo_ps_surface_dsc_begin_page_setup(lua_State* L)
{
    cairo_surface_t	*surface = get_cairo_surface_t (L, 1);
    cairo_ps_surface_dsc_begin_page_setup (surface);
    return 0;
}