Respond to hjust
and vjust
(previously ignored).
Allow width
and height
to be NULL
(in fact those are now the defaults)
and fill them in based on image aspect ratio.
Bug fix for SVG with decimal place in width
or height
.
Additional support for parsing newer Cairo SVG output:
feColorMatrix filter effect.
feImage filter effect.
feComposite filter effect.
filters with more than one filter effect.
more general transform attributes.
Expand SVG parser to support newer Cairo SVG output (Cairo >= 1.18.0).
Root <svg>
element has no units on width
and
height
.
Many other elements use SVG presentation attributes rather
than a single style
attribute (with CSS attributes).
Restore current graphics device after readPicture()
call. Thanks to Trevor Davis for report and patch.
Add Picture
method for applyTransform()
.
Thanks to Trevor Davis for report.
pictureGrob()
has a new argument delayContent
.
If that is TRUE
, the function returns a "PictureGrob"
gTree that has a makeContent()
method, so that
grobify()
only happens at drawing time, so that,
IF we are using gridSVG for output,
registration of SVG definitions happens within the current
viewport. The default value is ext == "gridSVG"
.
Internal restructuring: to fix more complex SVG input
where <defs>
refer to each other and include nested
transformations; to handle transformations more consistently
in general; to fix calculation of bounding box for transformed
clipping path.
readPicture()
has a new argument initDefs
,
which controls whether the list of definitions (things like
masks, filters, gradient fills, ...) is initialized when
reading a new picture. This should be set to FALSE
when importing and drawing more than one picture in the same
R image.
fix for importing SVG containing <use>
elements that
refer to complex content (including nested <use>
elements,
<use>
use elements with transform
attributes,
<use>
elements with mask
attributes, and use
content with clip-path
attributes.
fix for feColorMatrix filter (matrix value was being transposed).
fix for ext="gridSVG"
when exporting definitions
(like masks) that contain references to other definitions
(like filters).
Added clip
argument to grid.picture()
so that
we can inherit clipping region when drawing an imported image
(default remains that the picture sets its own clipping viewport).
Thanks to Silas Dean.
Fix for importing radial gradient with gradientTransform (radius of gradient was not being transformed correctly).
Fix for makeContent()
methods for picRect, picPath,
and picPolyline, so that the forced grob has the same name
as the original grob.
Fix for parsing <symbol>
element with no children or
with empty image.
Fix for import of lwd
from SVG line-width
Relax import requirement that SVG file be generated by
grConvert; now accept SVG file that is generated by
grConvert OR SVG file that can be identified as being
generated by Cairo graphics. This allows us to accept, for example,
files generated by rsvg_svg()
from the rsvg package.
Fix for importing rotated rectangles.
Fix for importing rotated raster images.
Improved import of line widths.
Enhancement of importing patterns to allow general pattern content, rather than just a single image as pattern content.
Fix for 'default.units' argument in grid.picture(), which was being ignored.
Fix to grobify() method for "PictureImage"
to correct
location calculation for raster element (was doing incorrect
unit arithmetic).
Fix to parseSVGUse() to handle direct <use> of image (not for a pattern or mask, but for an actual image); problem was that image was not positioned correctly.
Fix to pictureVP() to handle inverted x-scale or y-scale; problem was evident in incorrect overall clipping (because pictureVP() was incorrect shape).
Fix to path parsing to handle path data of the form
d="M x y"
(by ignoring such paths).
Bug fix for converting SVG style to gpar settings
when style is a url() reference (it was doing the wrong thing
to replace, for example, gp$fill
with
gp$gradientFill
and could end up with neither).
Bug fix for <path> with 'transform' and 'fill' that is url() reference. The transform was not being applied to the referenced gradient fill.
Initial release. Intended to import SVG images generated by the 'grConvert' package.
Now using SVG instead of PostScript, allowing us to support many more graphical features.