Exemplo n.º 1
0
void pdf_place_image(PDF pdf, halfword p)
{
    scaled_whd dim;
    image_dict *idict = idict_array[rule_index(p)];
    dim.wd = width(p);
    dim.ht = height(p);
    dim.dp = depth(p);
    place_img(pdf, idict, dim, rule_transform(p));
}
Exemplo n.º 2
0
void vf_out_image(PDF pdf, unsigned i)
{
    image *a, **aa;
    image_dict *ad;
    lua_State *L = Luas;        /* ... */
    lua_rawgeti(L, LUA_GLOBALSINDEX, (int) i);  /* image ... */
    aa = (image **) luaL_checkudata(L, -1, TYPE_IMG);
    a = *aa;
    ad = img_dict(a);
    assert(ad != NULL);
    setup_image(pdf, a, WR_VF_IMG);     /* image ... */
    place_img(pdf, ad, img_dimen(a), img_transform(a));
    lua_pop(L, 1);              /* ... */
}
Exemplo n.º 3
0
void vf_out_image(PDF pdf, unsigned i)
{
    image *a, **aa;
    image_dict *ad;
    lua_rawgeti(Luas, LUA_REGISTRYINDEX, (int) i);
    aa = (image **) luaL_checkudata(Luas, -1, TYPE_IMG);
    a = *aa;
    ad = img_dict(a);
    if (ad == NULL) {
        luaL_error(Luas, "invalid image dictionary");
    }
    setup_image(pdf, a, WR_VF_IMG);
    place_img(pdf, ad, img_dimen(a), img_transform(a));
    lua_pop(Luas, 1);
}