Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
08117975
Commit
08117975
authored
Apr 18, 2011
by
Moritz Lipp
Browse files
Updated plugins
parent
2eed47a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
ft/djvu/djvu.c
View file @
08117975
...
...
@@ -218,13 +218,13 @@ djvu_page_form_fields_get(zathura_page_t* page)
zathura_image_buffer_t
*
djvu_page_render
(
zathura_page_t
*
page
)
{
if
(
!
Zathura
.
document
||
!
page
||
!
page
->
document
)
{
if
(
!
page
||
!
page
->
document
)
{
return
NULL
;
}
/* calculate sizes */
unsigned
int
page_width
=
Zathura
.
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
Zathura
.
document
->
scale
*
page
->
height
;
unsigned
int
page_width
=
page
->
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
page
->
document
->
scale
*
page
->
height
;
if
(
!
page_width
||
!
page_height
)
{
goto
error_out
;
...
...
ft/pdf-mupdf/pdf.c
View file @
08117975
...
...
@@ -176,15 +176,15 @@ pdf_page_form_fields_get(zathura_page_t* page)
zathura_image_buffer_t
*
pdf_page_render
(
zathura_page_t
*
page
)
{
if
(
!
Zathura
.
document
||
!
page
||
!
page
->
data
||
!
page
->
document
)
{
if
(
!
page
||
!
page
->
data
||
!
page
->
document
)
{
return
NULL
;
}
/* calculate sizes */
unsigned
int
page_width
=
Zathura
.
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
Zathura
.
document
->
scale
*
page
->
height
;
unsigned
int
page_width
=
page
->
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
page
->
document
->
scale
*
page
->
height
;
if
(
Zathura
.
document
->
rotate
==
90
||
Zathura
.
document
->
rotate
==
270
)
{
if
(
page
->
document
->
rotate
==
90
||
page
->
document
->
rotate
==
270
)
{
unsigned
int
dim_temp
=
0
;
dim_temp
=
page_width
;
page_width
=
page_height
;
...
...
@@ -215,9 +215,9 @@ pdf_page_render(zathura_page_t* page)
fz_matrix
ctm
=
fz_identity
;
ctm
=
fz_concat
(
ctm
,
fz_translate
(
0
,
-
mupdf_page
->
page
->
mediabox
.
y1
));
ctm
=
fz_concat
(
ctm
,
fz_scale
(
Zathura
.
document
->
scale
,
-
Zathura
.
document
->
scale
));
ctm
=
fz_concat
(
ctm
,
fz_scale
(
page
->
document
->
scale
,
-
page
->
document
->
scale
));
ctm
=
fz_concat
(
ctm
,
fz_rotate
(
mupdf_page
->
page
->
rotate
));
ctm
=
fz_concat
(
ctm
,
fz_rotate
(
Zathura
.
document
->
rotate
));
ctm
=
fz_concat
(
ctm
,
fz_rotate
(
page
->
document
->
rotate
));
fz_bbox
bbox
=
fz_roundrect
(
fz_transformrect
(
ctm
,
mupdf_page
->
page
->
mediabox
));
fz_pixmap
*
pixmap
=
fz_newpixmapwithrect
(
fz_devicergb
,
bbox
);
...
...
ft/pdf-poppler/pdf.c
View file @
08117975
...
...
@@ -253,13 +253,13 @@ pdf_page_form_fields_get(zathura_page_t* page)
zathura_image_buffer_t
*
pdf_page_render
(
zathura_page_t
*
page
)
{
if
(
!
Zathura
.
document
||
!
page
||
!
page
->
data
||
!
page
->
document
)
{
if
(
!
page
||
!
page
->
data
||
!
page
->
document
)
{
return
NULL
;
}
/* calculate sizes */
unsigned
int
page_width
=
Zathura
.
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
Zathura
.
document
->
scale
*
page
->
height
;
unsigned
int
page_width
=
page
->
document
->
scale
*
page
->
width
;
unsigned
int
page_height
=
page
->
document
->
scale
*
page
->
height
;
/* create pixbuf */
GdkPixbuf
*
pixbuf
=
gdk_pixbuf_new
(
GDK_COLORSPACE_RGB
,
FALSE
,
8
,
...
...
@@ -270,7 +270,7 @@ pdf_page_render(zathura_page_t* page)
}
poppler_page_render_to_pixbuf
(
page
->
data
,
0
,
0
,
page_width
,
page_height
,
Zathura
.
document
->
scale
,
90
,
pixbuf
);
page
->
document
->
scale
,
90
,
pixbuf
);
/* create image buffer */
zathura_image_buffer_t
*
image_buffer
=
zathura_image_buffer_create
(
page_width
,
page_height
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment