本文整理汇总了C++中pdf_to_real函数的典型用法代码示例。如果您正苦于以下问题:C++ pdf_to_real函数的具体用法?C++ pdf_to_real怎么用?C++ pdf_to_real使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pdf_to_real函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pdf_annot_quad_point
void
pdf_annot_quad_point(fz_context *ctx, pdf_annot *annot, int idx, float v[8])
{
pdf_obj *quad_points;
pdf_obj *quad_point;
fz_matrix page_ctm;
int i;
check_allowed_subtypes(ctx, annot, PDF_NAME_QuadPoints, quad_point_subtypes);
quad_points = pdf_dict_get(ctx, annot->obj, PDF_NAME_QuadPoints);
quad_point = pdf_array_get(ctx, quad_points, idx);
pdf_page_transform(ctx, annot->page, NULL, &page_ctm);
for (i = 0; i < 8; i += 2)
{
fz_point point;
point.x = pdf_to_real(ctx, pdf_array_get(ctx, quad_point, i+0));
point.y = pdf_to_real(ctx, pdf_array_get(ctx, quad_point, i+1));
fz_transform_point(&point, &page_ctm);
v[i+0] = point.x;
v[i+1] = point.y;
}
}
开发者ID:project-renard-survey,项目名称:mupdf,代码行数:25,代码来源:pdf-annot-edit.c
示例2: intersect_box
static void
intersect_box(fz_context *ctx, pdf_document *doc, pdf_obj *page, pdf_obj *box_name, const fz_rect *mb)
{
pdf_obj *box = pdf_dict_get(ctx, page, box_name);
pdf_obj *newbox;
fz_rect old_rect;
if (box == NULL)
return;
old_rect.x0 = pdf_to_real(ctx, pdf_array_get(ctx, box, 0));
old_rect.y0 = pdf_to_real(ctx, pdf_array_get(ctx, box, 1));
old_rect.x1 = pdf_to_real(ctx, pdf_array_get(ctx, box, 2));
old_rect.y1 = pdf_to_real(ctx, pdf_array_get(ctx, box, 3));
if (old_rect.x0 < mb->x0)
old_rect.x0 = mb->x0;
if (old_rect.y0 < mb->y0)
old_rect.y0 = mb->y0;
if (old_rect.x1 > mb->x1)
old_rect.x1 = mb->x1;
if (old_rect.y1 > mb->y1)
old_rect.y1 = mb->y1;
newbox = pdf_new_array(ctx, doc, 4);
pdf_array_push(ctx, newbox, pdf_new_real(ctx, doc, old_rect.x0));
pdf_array_push(ctx, newbox, pdf_new_real(ctx, doc, old_rect.y0));
pdf_array_push(ctx, newbox, pdf_new_real(ctx, doc, old_rect.x1));
pdf_array_push(ctx, newbox, pdf_new_real(ctx, doc, old_rect.y1));
pdf_dict_put(ctx, page, box_name, newbox);
}
开发者ID:SriramBms,项目名称:mupdf-clone,代码行数:31,代码来源:pdfposter.c
示例3: pdf_annot_ink_list_stroke_vertex
void
pdf_annot_ink_list_stroke_vertex(fz_context *ctx, pdf_annot *annot, int i, int k, float v[2])
{
pdf_obj *ink_list;
pdf_obj *stroke;
fz_matrix page_ctm;
fz_point point = { 0, 0 };
check_allowed_subtypes(ctx, annot, PDF_NAME_InkList, ink_list_subtypes);
ink_list = pdf_dict_get(ctx, annot->obj, PDF_NAME_InkList);
stroke = pdf_array_get(ctx, ink_list, i);
if (v)
{
pdf_page_transform(ctx, annot->page, NULL, &page_ctm);
point.x = pdf_to_real(ctx, pdf_array_get(ctx, stroke, k * 2 + 0));
point.y = pdf_to_real(ctx, pdf_array_get(ctx, stroke, k * 2 + 1));
fz_transform_point(&point, &page_ctm);
v[0] = point.x;
v[1] = point.y;
}
}
开发者ID:project-renard-survey,项目名称:mupdf,代码行数:25,代码来源:pdf-annot-edit.c
示例4: pdf_to_rect
fz_rect *
pdf_to_rect(fz_context *ctx, pdf_obj *array, fz_rect *r)
{
float a = pdf_to_real(pdf_array_get(array, 0));
float b = pdf_to_real(pdf_array_get(array, 1));
float c = pdf_to_real(pdf_array_get(array, 2));
float d = pdf_to_real(pdf_array_get(array, 3));
r->x0 = fz_min(a, c);
r->y0 = fz_min(b, d);
r->x1 = fz_max(a, c);
r->y1 = fz_max(b, d);
return r;
}
开发者ID:panyihua,项目名称:SumatraPDF_SpecialPrint,代码行数:13,代码来源:pdf-parse.c
示例5: pdf_annot_color_imp
static void
pdf_annot_color_imp(fz_context *ctx, pdf_annot *annot, pdf_obj *key, int *n, float color[4])
{
pdf_obj *obj = pdf_dict_get(ctx, annot->obj, key);
*n = 0;
if (pdf_is_array(ctx, obj))
{
switch (pdf_array_len(ctx, obj))
{
case 1:
*n = 1;
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
break;
case 3:
*n = 3;
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
color[1] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
color[2] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));
break;
case 4:
*n = 4;
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
color[1] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
color[2] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));
color[3] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 3));
break;
}
}
}
开发者ID:ArtifexSoftware,项目名称:mupdf,代码行数:29,代码来源:pdf-annot-edit.c
示例6: pdf_to_rect
fz_rect
pdf_to_rect(fz_context *ctx, pdf_obj *array)
{
fz_rect r;
float a = pdf_to_real(pdf_array_get(array, 0));
float b = pdf_to_real(pdf_array_get(array, 1));
float c = pdf_to_real(pdf_array_get(array, 2));
float d = pdf_to_real(pdf_array_get(array, 3));
r.x0 = MIN(a, c);
r.y0 = MIN(b, d);
r.x1 = MAX(a, c);
r.y1 = MAX(b, d);
return r;
}
开发者ID:kzmkv,项目名称:SumatraPDF,代码行数:14,代码来源:pdf_parse.c
示例7: pdf_load_function_based_shading
static void
pdf_load_function_based_shading(fz_shade *shade, pdf_document *xref, pdf_obj *dict, pdf_function *func)
{
pdf_obj *obj;
float x0, y0, x1, y1;
float fv[2];
fz_matrix matrix;
int xx, yy;
fz_context *ctx = xref->ctx;
float *p;
x0 = y0 = 0;
x1 = y1 = 1;
obj = pdf_dict_gets(dict, "Domain");
if (obj)
{
x0 = pdf_to_real(pdf_array_get(obj, 0));
x1 = pdf_to_real(pdf_array_get(obj, 1));
y0 = pdf_to_real(pdf_array_get(obj, 2));
y1 = pdf_to_real(pdf_array_get(obj, 3));
}
obj = pdf_dict_gets(dict, "Matrix");
if (obj)
pdf_to_matrix(ctx, obj, &matrix);
else
matrix = fz_identity;
shade->u.f.matrix = matrix;
shade->u.f.xdivs = FUNSEGS;
shade->u.f.ydivs = FUNSEGS;
shade->u.f.fn_vals = fz_malloc(ctx, (FUNSEGS+1)*(FUNSEGS+1)*shade->colorspace->n*sizeof(float));
shade->u.f.domain[0][0] = x0;
shade->u.f.domain[0][1] = y0;
shade->u.f.domain[1][0] = x1;
shade->u.f.domain[1][1] = y1;
p = shade->u.f.fn_vals;
for (yy = 0; yy <= FUNSEGS; yy++)
{
fv[1] = y0 + (y1 - y0) * yy / FUNSEGS;
for (xx = 0; xx <= FUNSEGS; xx++)
{
fv[0] = x0 + (x1 - x0) * xx / FUNSEGS;
pdf_eval_function(ctx, func, fv, 2, p, shade->colorspace->n);
p += shade->colorspace->n;
}
}
}
开发者ID:AvinashKiran,项目名称:mupdf,代码行数:50,代码来源:pdf_shade.c
示例8: pdf_load_pattern
pdf_pattern *
pdf_load_pattern(fz_context *ctx, pdf_document *doc, pdf_obj *dict)
{
pdf_pattern *pat;
pdf_obj *obj;
if ((pat = pdf_find_item(ctx, pdf_drop_pattern_imp, dict)) != NULL)
{
return pat;
}
pat = fz_malloc_struct(ctx, pdf_pattern);
FZ_INIT_STORABLE(pat, 1, pdf_drop_pattern_imp);
pat->document = doc;
pat->resources = NULL;
pat->contents = NULL;
fz_try(ctx)
{
/* Store pattern now, to avoid possible recursion if objects refer back to this one */
pdf_store_item(ctx, dict, pat, pdf_pattern_size(pat));
pat->ismask = pdf_to_int(ctx, pdf_dict_get(ctx, dict, PDF_NAME_PaintType)) == 2;
pat->xstep = pdf_to_real(ctx, pdf_dict_get(ctx, dict, PDF_NAME_XStep));
pat->ystep = pdf_to_real(ctx, pdf_dict_get(ctx, dict, PDF_NAME_YStep));
obj = pdf_dict_gets(ctx, dict, "BBox");
pdf_to_rect(ctx, obj, &pat->bbox);
obj = pdf_dict_gets(ctx, dict, "Matrix");
if (obj)
pdf_to_matrix(ctx, obj, &pat->matrix);
else
pat->matrix = fz_identity;
pat->resources = pdf_dict_get(ctx, dict, PDF_NAME_Resources);
if (pat->resources)
pdf_keep_obj(ctx, pat->resources);
pat->contents = pdf_keep_obj(ctx, dict);
}
fz_catch(ctx)
{
pdf_remove_item(ctx, pdf_drop_pattern_imp, dict);
pdf_drop_pattern(ctx, pat);
fz_rethrow_message(ctx, "cannot load pattern (%d %d R)", pdf_to_num(ctx, dict), pdf_to_gen(ctx, dict));
}
return pat;
}
开发者ID:GKerison,项目名称:mupdf-1,代码行数:49,代码来源:pdf-pattern.c
示例9: pdf_load_pattern
pdf_pattern *
pdf_load_pattern(pdf_document *xref, pdf_obj *dict)
{
pdf_pattern *pat;
pdf_obj *obj;
fz_context *ctx = xref->ctx;
if ((pat = pdf_find_item(ctx, pdf_free_pattern_imp, dict)))
{
return pat;
}
pat = fz_malloc_struct(ctx, pdf_pattern);
FZ_INIT_STORABLE(pat, 1, pdf_free_pattern_imp);
pat->resources = NULL;
pat->contents = NULL;
/* Store pattern now, to avoid possible recursion if objects refer back to this one */
pdf_store_item(ctx, dict, pat, pdf_pattern_size(pat));
pat->ismask = pdf_to_int(pdf_dict_gets(dict, "PaintType")) == 2;
pat->xstep = pdf_to_real(pdf_dict_gets(dict, "XStep"));
pat->ystep = pdf_to_real(pdf_dict_gets(dict, "YStep"));
obj = pdf_dict_gets(dict, "BBox");
pdf_to_rect(ctx, obj, &pat->bbox);
obj = pdf_dict_gets(dict, "Matrix");
if (obj)
pdf_to_matrix(ctx, obj, &pat->matrix);
else
pat->matrix = fz_identity;
pat->resources = pdf_dict_gets(dict, "Resources");
if (pat->resources)
pdf_keep_obj(pat->resources);
fz_try(ctx)
{
pat->contents = pdf_keep_obj(dict);
}
fz_catch(ctx)
{
pdf_remove_item(ctx, pdf_free_pattern_imp, dict);
pdf_drop_pattern(ctx, pat);
fz_throw(ctx, "cannot load pattern stream (%d %d R)", pdf_to_num(dict), pdf_to_gen(dict));
}
return pat;
}
开发者ID:AvinashKiran,项目名称:mupdf,代码行数:49,代码来源:pdf_pattern.c
示例10: pdf_annot_opacity
float pdf_annot_opacity(fz_context *ctx, pdf_annot *annot)
{
pdf_obj *ca = pdf_dict_get(ctx, annot->obj, PDF_NAME(CA));
if (pdf_is_number(ctx, ca))
return pdf_to_real(ctx, ca);
return 1;
}
开发者ID:muennich,项目名称:mupdf,代码行数:7,代码来源:pdf-annot-edit.c
示例11: pdf_annot_border
float
pdf_annot_border(fz_context *ctx, pdf_annot *annot)
{
pdf_obj *border = pdf_dict_get(ctx, annot->obj, PDF_NAME_Border);
if (pdf_is_array(ctx, border))
return pdf_to_real(ctx, pdf_array_get(ctx, border, 2));
return 1;
}
开发者ID:project-renard-survey,项目名称:mupdf,代码行数:8,代码来源:pdf-annot-edit.c
示例12: pdf_annot_vertex
void
pdf_annot_vertex(fz_context *ctx, pdf_annot *annot, int i, float v[2])
{
pdf_obj *vertices;
fz_matrix page_ctm;
fz_point point;
check_allowed_subtypes(ctx, annot, PDF_NAME_Vertices, vertices_subtypes);
vertices = pdf_dict_get(ctx, annot->obj, PDF_NAME_Vertices);
pdf_page_transform(ctx, annot->page, NULL, &page_ctm);
point.x = pdf_to_real(ctx, pdf_array_get(ctx, vertices, i * 2));
point.y = pdf_to_real(ctx, pdf_array_get(ctx, vertices, i * 2 + 1));
fz_transform_point(&point, &page_ctm);
v[0] = point.x;
v[1] = point.y;
}
开发者ID:project-renard-survey,项目名称:mupdf,代码行数:19,代码来源:pdf-annot-edit.c
示例13: pdf_annot_border
float
pdf_annot_border(fz_context *ctx, pdf_annot *annot)
{
pdf_obj *bs, *bs_w;
bs = pdf_dict_get(ctx, annot->obj, PDF_NAME(BS));
bs_w = pdf_dict_get(ctx, bs, PDF_NAME(W));
if (pdf_is_number(ctx, bs_w))
return pdf_to_real(ctx, bs_w);
return 1;
}
开发者ID:muennich,项目名称:mupdf,代码行数:10,代码来源:pdf-annot-edit.c
示例14: pdf_load_radial_shading
static void
pdf_load_radial_shading(fz_shade *shade, pdf_document *xref, pdf_obj *dict, int funcs, pdf_function **func)
{
pdf_obj *obj;
float d0, d1;
int e0, e1;
float x0, y0, r0, x1, y1, r1;
struct vertex p1, p2;
fz_context *ctx = xref->ctx;
obj = pdf_dict_gets(dict, "Coords");
x0 = pdf_to_real(pdf_array_get(obj, 0));
y0 = pdf_to_real(pdf_array_get(obj, 1));
r0 = pdf_to_real(pdf_array_get(obj, 2));
x1 = pdf_to_real(pdf_array_get(obj, 3));
y1 = pdf_to_real(pdf_array_get(obj, 4));
r1 = pdf_to_real(pdf_array_get(obj, 5));
d0 = 0;
d1 = 1;
obj = pdf_dict_gets(dict, "Domain");
if (pdf_array_len(obj) == 2)
{
d0 = pdf_to_real(pdf_array_get(obj, 0));
d1 = pdf_to_real(pdf_array_get(obj, 1));
}
e0 = e1 = 0;
obj = pdf_dict_gets(dict, "Extend");
if (pdf_array_len(obj) == 2)
{
e0 = pdf_to_bool(pdf_array_get(obj, 0));
e1 = pdf_to_bool(pdf_array_get(obj, 1));
}
pdf_sample_shade_function(ctx, shade, funcs, func, d0, d1);
shade->type = FZ_RADIAL;
shade->extend[0] = e0;
shade->extend[1] = e1;
p1.x = x0;
p1.y = y0;
p1.c[0] = r0;
pdf_add_vertex(ctx, shade, &p1);
p2.x = x1;
p2.y = y1;
p2.c[0] = r1;
pdf_add_vertex(ctx, shade, &p2);
}
开发者ID:UIKit0,项目名称:mupdf,代码行数:52,代码来源:pdf_shade.c
示例15: pdf_load_linear_shading
static void
pdf_load_linear_shading(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_obj *dict, int funcs, fz_function **func)
{
pdf_obj *obj;
float d0, d1;
int e0, e1;
obj = pdf_dict_gets(ctx, dict, "Coords");
shade->u.l_or_r.coords[0][0] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
shade->u.l_or_r.coords[0][1] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
shade->u.l_or_r.coords[1][0] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));
shade->u.l_or_r.coords[1][1] = pdf_to_real(ctx, pdf_array_get(ctx, obj, 3));
d0 = 0;
d1 = 1;
obj = pdf_dict_gets(ctx, dict, "Domain");
if (obj)
{
d0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
d1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
}
e0 = e1 = 0;
obj = pdf_dict_gets(ctx, dict, "Extend");
if (obj)
{
e0 = pdf_to_bool(ctx, pdf_array_get(ctx, obj, 0));
e1 = pdf_to_bool(ctx, pdf_array_get(ctx, obj, 1));
}
pdf_sample_shade_function(ctx, shade, funcs, func, d0, d1);
shade->u.l_or_r.extend[0] = e0;
shade->u.l_or_r.extend[1] = e1;
}
开发者ID:zyma678,项目名称:iOSMuPDFSource,代码行数:35,代码来源:pdf-shade.c
示例16: pdf_annot_color_imp
static void pdf_annot_color_imp(fz_context *ctx, pdf_annot *annot, pdf_obj *key, int *n, float color[4], pdf_obj **allowed)
{
pdf_obj *arr;
int len;
if (allowed)
check_allowed_subtypes(ctx, annot, key, allowed);
arr = pdf_dict_get(ctx, annot->obj, key);
len = pdf_array_len(ctx, arr);
switch (len)
{
case 0:
if (n)
*n = 0;
break;
case 1:
case 2:
if (n)
*n = 1;
if (color)
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 0));
break;
case 3:
if (n)
*n = 3;
if (color)
{
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 0));
color[1] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 1));
color[2] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 2));
}
break;
case 4:
default:
if (n)
*n = 4;
if (color)
{
color[0] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 0));
color[1] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 1));
color[2] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 2));
color[3] = pdf_to_real(ctx, pdf_array_get(ctx, arr, 3));
}
break;
}
}
开发者ID:project-renard-survey,项目名称:mupdf,代码行数:48,代码来源:pdf-annot-edit.c
示例17: pdf_load_font_descriptor
static void
pdf_load_font_descriptor(pdf_font_desc *fontdesc, pdf_document *doc, pdf_obj *dict, char *collection, char *basefont, int iscidfont, int has_encoding)
{
pdf_obj *obj1, *obj2, *obj3, *obj;
char *fontname, *origname;
FT_Face face;
fz_context *ctx = doc->ctx;
/* Prefer BaseFont; don't bother with FontName */
origname = basefont;
/* SumatraPDF: handle /BaseFont /Arial,Bold+000041 /FontName /Arial,Bold */
if (strchr(basefont, '+') && pdf_is_name(pdf_dict_gets(dict, "FontName")))
origname = pdf_to_name(pdf_dict_gets(dict, "FontName"));
/* cf. http://code.google.com/p/sumatrapdf/issues/detail?id=1616 */
if (strlen(origname) > 7 && origname[6] == '+')
origname += 7;
/* Look through list of alternate names for built in fonts */
fontname = clean_font_name(origname);
fontdesc->flags = pdf_to_int(pdf_dict_gets(dict, "Flags"));
fontdesc->italic_angle = pdf_to_real(pdf_dict_gets(dict, "ItalicAngle"));
fontdesc->ascent = pdf_to_real(pdf_dict_gets(dict, "Ascent"));
fontdesc->descent = pdf_to_real(pdf_dict_gets(dict, "Descent"));
fontdesc->cap_height = pdf_to_real(pdf_dict_gets(dict, "CapHeight"));
fontdesc->x_height = pdf_to_real(pdf_dict_gets(dict, "XHeight"));
fontdesc->missing_width = pdf_to_real(pdf_dict_gets(dict, "MissingWidth"));
obj1 = pdf_dict_gets(dict, "FontFile");
obj2 = pdf_dict_gets(dict, "FontFile2");
obj3 = pdf_dict_gets(dict, "FontFile3");
obj = obj1 ? obj1 : obj2 ? obj2 : obj3;
if (pdf_is_indirect(obj))
{
fz_try(ctx)
{
pdf_load_embedded_font(doc, fontdesc, fontname, obj);
}
fz_catch(ctx)
{
fz_rethrow_if(ctx, FZ_ERROR_TRYLATER);
fz_warn(ctx, "ignored error when loading embedded font; attempting to load system font");
if (origname != fontname && !iscidfont)
pdf_load_builtin_font(ctx, fontdesc, fontname);
else
pdf_load_system_font(ctx, fontdesc, fontname, collection, has_encoding);
}
}
else
{
if (origname != fontname && !iscidfont)
开发者ID:superbatonchik,项目名称:mupdf-converter,代码行数:54,代码来源:pdf-font.c
示例18: pdf_to_matrix
fz_matrix *
pdf_to_matrix(fz_context *ctx, pdf_obj *array, fz_matrix *m)
{
m->a = pdf_to_real(pdf_array_get(array, 0));
m->b = pdf_to_real(pdf_array_get(array, 1));
m->c = pdf_to_real(pdf_array_get(array, 2));
m->d = pdf_to_real(pdf_array_get(array, 3));
m->e = pdf_to_real(pdf_array_get(array, 4));
m->f = pdf_to_real(pdf_array_get(array, 5));
return m;
}
开发者ID:panyihua,项目名称:SumatraPDF_SpecialPrint,代码行数:11,代码来源:pdf-parse.c
示例19: pdf_to_matrix
fz_matrix
pdf_to_matrix(fz_context *ctx, pdf_obj *array)
{
fz_matrix m;
m.a = pdf_to_real(pdf_array_get(array, 0));
m.b = pdf_to_real(pdf_array_get(array, 1));
m.c = pdf_to_real(pdf_array_get(array, 2));
m.d = pdf_to_real(pdf_array_get(array, 3));
m.e = pdf_to_real(pdf_array_get(array, 4));
m.f = pdf_to_real(pdf_array_get(array, 5));
return m;
}
开发者ID:kzmkv,项目名称:SumatraPDF,代码行数:12,代码来源:pdf_parse.c
示例20: pdf_load_transition
static void
pdf_load_transition(pdf_document *doc, pdf_page *page, pdf_obj *transdict)
{
char *name;
pdf_obj *obj;
int type;
obj = pdf_dict_gets(transdict, "D");
page->transition.duration = (obj ? pdf_to_real(obj) : 1);
page->transition.vertical = (pdf_to_name(pdf_dict_gets(transdict, "Dm"))[0] != 'H');
page->transition.outwards = (pdf_to_name(pdf_dict_gets(transdict, "M"))[0] != 'I');
/* FIXME: If 'Di' is None, it should be handled differently, but
* this only affects Fly, and we don't implement that currently. */
page->transition.direction = (pdf_to_int(pdf_dict_gets(transdict, "Di")));
/* FIXME: Read SS for Fly when we implement it */
/* FIXME: Read B for Fly when we implement it */
name = pdf_to_name(pdf_dict_gets(transdict, "S"));
if (!strcmp(name, "Split"))
type = FZ_TRANSITION_SPLIT;
else if (!strcmp(name, "Blinds"))
type = FZ_TRANSITION_BLINDS;
else if (!strcmp(name, "Box"))
type = FZ_TRANSITION_BOX;
else if (!strcmp(name, "Wipe"))
type = FZ_TRANSITION_WIPE;
else if (!strcmp(name, "Dissolve"))
type = FZ_TRANSITION_DISSOLVE;
else if (!strcmp(name, "Glitter"))
type = FZ_TRANSITION_GLITTER;
else if (!strcmp(name, "Fly"))
type = FZ_TRANSITION_FLY;
else if (!strcmp(name, "Push"))
type = FZ_TRANSITION_PUSH;
else if (!strcmp(name, "Cover"))
type = FZ_TRANSITION_COVER;
else if (!strcmp(name, "Uncover"))
type = FZ_TRANSITION_UNCOVER;
else if (!strcmp(name, "Fade"))
type = FZ_TRANSITION_FADE;
else
type = FZ_TRANSITION_NONE;
page->transition.type = type;
}
开发者ID:codepongo,项目名称:sumatrapdf,代码行数:45,代码来源:pdf-page.c
注:本文中的pdf_to_real函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论