drawJpeg {harupdf} R Documentation

Draw One JPEG File

Description

drawJpeg draws one JPEG image at the given locations and sizes.

Usage

drawJpeg(jpeg_file,
            xleft, ybottom, xright, ytop,
            angle = 0, ...)

Arguments

jpeg_file a character string giving the name of the JPEG file
xleft a real value for left x positions.
ybottom a real value for bottom y positions.
xright a real value for right x positions.
ytop a real value for top y positions.
angle angle of rotation (in degrees, anti-clockwise from positive x-axis, about the bottom-left corner).
... graphical parameters.

Details

The positions supplied, i.e., xleft, ..., are relative to the current plotting region. If the x-axis goes from 100 to 200 then xleft should be larger than 100 and xright should be less than 200. The position vectors will be recycled to the length of the longest.

See Also

rasterImage and drawPng and others for flexible ways to draw image on the PDF device.

Examples

require(harupdf)

#create a PDF file
harupdf(file="C:\temp\haru_test.pdf", paper="letter", width=7, height=9.5);

plot(0:20, 0:20, type="n", xlim=c(0, 7*72), ylim=c(0, 9.5*72), xlab="", ylab="", xaxt="n", yaxt="n", bty="n");
#draw a JPEG image on the plot
drawJpeg("C:\temp\huge.jpeg",0,0, 7*72, 9.5*72,0);

#close device and output file
dev.off();


[Package harupdf version 2.12.0 Index]