Home

Package `Cairo`

image

Contents

1. see pdf ignored Cairo automatically detects and embeds fonts PDF version see pdf ignored see pdf ignored Cairo uses device dimensions see pdf ignored Cairo uses native enconding except for symbols see pdf ignored see pdf ignored Cairo uses device dimensions and thus it is irrelevant Windows specific ignored on unix Windows specific ignored on unix Windows specific ignored on unix Windows specific ignored on unix Windows specific ignored on unix Windows specific ignored on unix see postscript ignored see postscript ignored see postscript ignored see postscript ignored Cairo always uses RGB or ARGB The invisible return value is NULL if the device couldn t be created or a Cairo object if successful The vaule of the object is the device number Known issues e The X11 backend is quite slow The reason is the cairographics implementation of the back end so we can t do much about it It should be possible to drop cairographics Xlib backend entirely and use image backend copied into an X11 window instead We may try that in future releases TrueType and OpenType fonts are supported when this package is compiled against a cairo graphics library configured with FreeType and Fontconfig support Therefore make sure have a cairo graphics library with all bells and whistles to get a good result R math symbols are supported but require a TrueType Symbol font accessible to Cairo under
2. Cairo 2 CairoPS Cairo 2 CairoSVG Cairo 2 CairoTIFF Cairo 2 CairoWin Cairo 2 CairoX11 Cairo 2 jpeg 4 par 10 pdf 4 png 4 postscript 4 X11 3 12
3. previously opened Cairo graphics devices will also use these fonts The argument names correspond to the five values of the graphical parameter font i e regular is 1 bold is 2 italic is 3 etc For an explanation of fontconfig patterns see CairoFontMatch Known issues e This function is only available when the cairo graphics library is configured with FreeType and Fontcofig support e R math symbols are supported but require a Symbol font with the Adobe symbol encoding At the time of this release the authors are unaware of a free version of this font however they do exist on Windows and Mac OS X See Also CairoFontMatch Cairo par CairoFonts Examples Not run The following fontconfig patterns define the free truetype fonts available in the debian package ttf freefont Freesans is very similar to Helvetica CairoFonts regular FreeSans style Medium bold FreeSans style Bold italic FreeSans style Oblique bolditalic FreeSans style BoldObligue End Not run 11 Index Topic device Cairo 2 Cairo capabilities 5 Cairo capture 6 Cairo onSave 6 Cairo serial 7 CairoFonMatch 8 CairoFonts 10 Cairo 2 5 10 Cairo capabilities 3 5 Cairo capture 6 Cairo onSave 6 Cairo serial 7 Cairo snapshot Cairo capture 6 CairoFonMatch 8 CairoFontMatch 10 CairoFontMatch CairoFonMatch 8 CairoFonts 5 9 10 CairoJPEG Cairo 2 CairoPDF Cairo 2 CairoPNG
4. Package Cairo September 26 2015 Version 1 5 9 Title R graphics device using cairo graphics library for creating high quality bitmap PNG JPEG TIFF vector PDF SVG PostScript and display X11 and Win32 output Author Simon Urbanek lt Simon Urbanek r project org gt Jef frey Horner lt jeff horner vanderbilt edu gt Maintainer Simon Urbanek lt Simon Urbanek r project org gt Depends R gt 2 4 0 Imports grDevices graphics Suggests png Enhances FastRWeb Description Cairo graphics device that can be use to create high quality vec tor PDF PostScript and SVG and bitmap output PNG JPEG TIFF and high quality render ing in displays X11 and Win32 Since it uses the same back end for all output copy ing across formats is WYSIWYG Files are created without the dependence on X11 or other ex ternal programs This device supports alpha channel semi transparent drawing and result ing images can contain transparent and semi transparent regions It is ideal for use in server envi ronments file output and as a replacement for other devices that don t have Cairo s capabili ties such as alpha support or anti aliasing Backends are modular such that any subset of back ends is supported License GPL 2 SystemRequirements cairo gt 1 2 http www cairographics org URL http www rforge net Cairo NeedsCompilation yes Repository CRAN Date Publication 2015 09 26 09 05 40 R topics documented Cailor ce
5. anvas white xpos NA ypos NA CairoPNG filename Rplot 03d png width 480 height 480 pointsize 12 bg white res NA CairoJPEG filename Rplot 03d jpeg width 480 height 480 pointsize 12 quality 75 bg white res NA CairoTIFF filename Rplot 03d tiff width 480 height 480 pointsize 12 bg white res NA CairoPDF file ifelse onefile Rplots pdf Rplot 03d pdf width 6 height 6 onefile TRUE family Helvetica title R Graphics Output fonts NULL version 1 1 paper special encoding bg fg pointsize pagecentre CairoSVG file ifelse onefile Rplots svg Rplot 03d svg width 6 height 6 onefile TRUE bg transparent pointsize 12 CairoWin width 7 height 7 pointsize 12 record getOption graphics record rescale c R fit fixed xpinch ypinch bg transparent canvas white gamma getOption gamma Cairo 3 xpos NA ypos NA buffered getOption windowsBuffered restoreConsole FALSE CairoPS file ifelse onefile Rplots ps Rplot 03d ps onefile TRUE family title R Graphics Output fonts NULL encoding bg fg width height horizontal pointsize paper pagecentre print it command colormodel Arguments width width of the plot area also see units height height of the plot area also see units file name of the file to be creat
6. due to overflow Author s Simon Urbanek CairoFonMatch Find installed fonts with a fontconfig pattern Description CairoFontMatch searches for fonts based on a fontconfig pattern Usage CairoFontMatch fontpattern Helvetica sort FALSE verbose FALSE Arguments fontpattern character a fontconfig pattern sort logical if FALSE display only the best matching font for the pattern If TRUE display a sorted list of best matching fonts verbose logical if FALSE display the family style and file property for the pattern if TRUE display the canonical font pattern for each match Details This function displays a list of one or more fonts matching the supplied fontconfig pattern sort FALSE displays the font that Cairo will use for the supplied pattern while sort TRUE displays a sorted list of best matching fonts The simplest fontconfig pattern matching all installed fonts is Here s what CairoFontMatch displays on this system 1 family Bitstream Vera Sans style Roman file usr share fonts truetype ttf bitstream ver CairoFonMatch 9 verbose FALSE displays the font properties family style and file while verbose TRUE will display the canonical font pattern displaying all properties known for the font output of Cairo FontMatch verbose TRUE 1 family Bitstream Vera Sans style Roman file usr share fonts truetype ttf bitstr
7. eam ver Bitstream Vera Sans 12 familylang en style Roman stylelang en slant 0 weight 80 width 100 pixels A simple approach to selecting a font starts with calling CairoFontMatch sort TRUE to list all available fonts Next the user will choose a font from the list and call CairoFontMatch FamilyName style PreferredStyle s substituting FamilyName and PreferredStyle with the desired values If only one font is found then the user has found the fontconfig pattern that will select the desired font Otherwise the user will call CairoFontMatch with verbose TRUE to determine other properties to add to the pattern to attain the desired font for instance the fontformat The following excerpt is from the fontconfig user s manual http fontconfig org and better de scribes the fontconfig pattern definition Fontconfig provides a textual representation for patterns that the library can both accept and gen erate The representation is in three parts first a list of family names second a list of point sizes and finally a list of additional properties lt families gt lt point sizes gt lt name 1 gt lt values1 gt lt name2 gt lt values 2 gt Values in a list are separated with commas The name needn t include either families or point sizes they can be elided In addition there are symbolic constants that simultaneously indicate both a name and a value Here are some examples Font Pattern Meaning Times 12 12 poin
8. ed or connection to write to Only PDF PS and PNG types support connections For X11 type file specifies the display name If NULL or a reasonable default will be chosen which is plot type for file oriented types and value of the DISPLAY environment variable for X11 For image types the file name can contain printf style formatting expecting one inte ger parameter which is the page number such as Rplot 3d png The page numbers start at one moms type output type This version of Cario supports png jpeg and tiff bitmaps png tiff with transparent background pdf PDF file with embedded fonts svg SVG file ps PostScript file x11 X11 interactive window and win Windows graphics A special type raster creates an image back end that pro duces no actual output file but can be used in conjunction with any of dev capture grid cap or Cairo image to create in memory images Depending on the support of various backends in cairo graphics some of the options may not be available for your system See Cairo capabilities function pointsize initial text size in points canvas canvas color must be opaque The canvas is only used by devices that display graphics on a screen and the canvas is only visible only if bg is transparent bg plot background color can include alpha component or be transparent allto gether units units for of the width and height specifications It can be any of px pixels in
9. ev cur onSave Cairo serial 7 Arguments device device number or Cairo object as returned by the Cairo function onSave function that will replace the current callback or NULL to remove the current callback Value The old callback being replaced or NULL if there was none Note The function onSave will be evaluated in the global environment and no error checking is done so you must make sure to catch errors otherwise the behavior is undefined and may included crashing R orother bad things Author s Simon Urbanek See Also Cairo Examples if reguire png quietly TRUE dev lt Cairo 800 600 type raster Cairo onSave dev function dev page GlobalEnv png lt writePNG Cairo capture dev plot 1 10 col 2 dev off str png Cairo serial Check for changes in the graphics state of Cairo devices Description Cairo serial returns an integer that is increased with every plotting operation on the device This allows user code to determine whether any new content has been added to the device since it was last checked Usage Cairo serial device dev cur 8 CairoFonMatch Arguments device device number or an object of the class Cairo as obtained from the Cairo function Value Integer value Note The integer value overflows to 0 at 2431 Typically only equality should be checked and for such it is extremely unlikely that the state has changed yet the serial value is the same
10. he libraries available in the system as well as the compiled in modules in cairo graphics See Also Cairo 6 Cairo onSave Cairo capture Capture contents of an image backend or a display list snapshot Description Cairo capture is essentially the same as dev capture native TRUE with the exception that it works where dev capture doesn t such as onSave callbacks Cairo snapshot is very similar to recordPlot except it also allows to retrieve the last snapshot Usage Cairo capture device dev cur Cairo snapshot device dev cur last FALSE Arguments device device number or an object of the class Cairo as obtained from the Cairo function last logical if FALSE then a new snapshot is created exactly the same as recordPlot if TRUE then the last known snapshot is retrieved if NA then a snapshot is created first but if the display list is empty last snapshot is retrieved instead Value Cairo capture object of the class nativeRaster Cairo snapshot object of the class recordedplot Author s Simon Urbanek Cairo onSave Cairo callbacks Description Cairo onSave set the onSave callback which allows R code to be run when Cairo finalizes a page either due to a new page being created or by the device being closed The callback expects function device page where device will be the device number and page is the currently finished page number starting at 1 Usage Cairo onSave device d
11. inches pt points cm centimeters or mm millimeters dpi DPI used for the conversion of units to pixels If set to auto the DPI resolution will be determined by the back end additional backend specific parameters e g guality setting for JPEG 0 100 compression for TIFF 0 1 none 5 LZW default 7 JPEG 8 Adobe De flate locator for a custom locator function in image back ends All parameters listed below are defined by the other devices are are used by the wrappers to make it easier replace other devices by Cairo They are described in detail in the documentation corresponding to the device that is being replaced display X11 display see X11 gamma gamma correction xpos see X11 ypos see X11 filename res guality onefile family title fonts version paper encoding fg pagecentre record rescale xpinch ypinch buffered restoreConsole horizontal print it command colormodel Value Cairo same as filein Cairo resolution in ppi see png will override dpi in Cairo if set to anything other than NA or NULL Note that cairographics does not support tagging PNG output files with DPI so the raster image will be produced with the dpi setting but readers may render it at some default dpi setting quality of the jpeg see jpeg logical if true the default allow multiple figures in one file see pdf false is currently not supported by vector devices font family see pdf see pdf ignored
12. s ieee S K ea ee a oe ee ee ai 2 C ifo capabilities s 4 6 4 4 Sawa Kat eee Se KAS Se he A ee ee as 3 Cairo capture sa jus 4 53 See a bee lt eee Ree ee ada s ea ale 6 CairosonS ave 3 bn Gee a ie RS Bago a BRE a eo s aha ads 6 Camros tial cope os e bee eee REE oie eee oe oe ee Fhe ey os fi CairoFonMatch v eps i 4 i E aE a 6240S A E a E gs i dis 8 Alt OEONTS s 5 40 1 ace eo a pe Re Se R e e SE A EO SEE da g 10 Index 12 Cairo Create a new Cairo based graphics device Description Cairo initializes a new graphics device that uses the cairo graphics library for rendering The current implementation produces high quality PNG JPEG TIFF bitmap files high resolution PDF files with embedded fonts SVG graphics and PostScript files It also provides X11 and Windows interactive graphics devices Unlike other devices it supports all graphics features including alpha blending anti aliasing etc CairoX11 CairoPNG CairoPDF CairoPS and CairoSVG are convenience wrappers of Cairo that take the same arguments as the corresponding device it replaces such as X11 png pdf etc Use of the Cairo function is encouraged as it is more flexible than the wrappers Usage Cairo width 640 height 480 file type png pointsize 12 bg transparent canvas white units px dpi auto a CairoX11 display Sys getenv DISPLAY width 7 height 7 pointsize 12 gamma getOption gamma bg transparent c
13. t Times Roman Times 12 bold 12 point Times Bold Courier italic Courier Italic in the default size Monospace matrix 1 1 0 1 The users preferred monospace font with artificial obliquing The V and characters in family names must be preceeded by a V character to avoid having them misinterpreted Similarly values containing V _ and must also have them preceeded by a character The characters are stripped out of the family name and values as the font name is read Known issues e This function is only available when the Cairo graphics library is configured with FreeType and Fontcofig support See Also CairoFonts Cairo 10 CairoFonts CairoFonts Set the fonts used for all Cairo graphics devices Description CairoFonts initializes the fonts used for Cairo graphics devices Usage CairoFonts regular Helvetica style Regular bold Helvetica style Bold italic Helvetica style Italic bolditalic Helvetica style Bold Italic BoldItalic symbol Symbol Arguments regular character fontconfig pattern for the plain text font bold character fontconfig pattern for the bold face font italic character fontconfig pattern for the italic font bolditalic character fontconfig pattern for the bold italic font symbol character fontconfig pattern for the symbol font Details This function sets the fonts for Cairo graphics devices globally
14. that name Cairo capabilities 5 See Also CairoFonts Examples very simple KDE Cairo 600 600 file plot png type png bg white plot rnorm 40QQ rnorm 40QQ col ff000018 pch 19 cex 2 semi transparent red dev off creates a file plot png with the above plot you can use any Cairo backend and get the same result vector bitmap or on screen CairoPDF plot pdf 6 6 bg transparent data iris attach iris plot Petal Length rep 03 length Species xlim c 1 7 ylim c 0 1 7 xlab Petal Length ylab Density pch 21 cex 1 5 col 00000001 main Iris yet again bg c fF000020 00ff0020 0000Ff20 Lunclass Species for i in 1 3 polygon density Petal LengthLunclass Species i bw 0 2 col c Ff000040 4 00ff0040 10000ff40 i dev off Cairo capabilities Reports which output types are supported by this Cairo build Description Cairo capabilities returns a logical vector describing the capabilities of this particular Cairo build Usage Cairo capabilities Details The Cairo package provides multiple back ends such as images PNG JPEG TIFF vector graph ics PDF PostScript SVG or displays X11 Windows However not all systems support all back ends The Cairo capabilities function returns a logical vector showing which capabilities are supported in this particular Cairo build Note that the capabilities depend both on t

Download Pdf Manuals

image

Related Search

Related Contents

Gembird WM-004 flat panel wall mount  Bell'O 7770B flat panel wall mount  Modo de empleo IMPRESSA XJ9 Professional  ANEXO 3  JVC CAM Control (für Windows) Benutzerhandbuch  ハイブリッドファン STJK HBF-STJK  Carnet de lectures – Été 2015  =ーNAX ンヤワールームユニッ ト  Coby CX90  

Copyright © All rights reserved.
Failed to retrieve file