Scale multiples all the user coordinates by the specified
x-factor and y-factor. Factors can be factional or negative.
SkewX and SkewY let you skew one of the axes.
Transformation
Meaning
Parameters
scale
Defines a scaling of the X and
Y coordinates
x and y defining the scaling
in the X and Y directions
transform = "scale(x [y])"
The amount of scaling in the x and y directions
can be controlled separately, but if only one value
is specified, it will be used for both.
skewX
Defines a skew along the X axis
angle degrees defining a skew
of the X position by Y*tan(angle)
skewX(angle)
The skewX transformation "pushes" all the
x-coordinates by the specified angle. Visually, this
makes vertical lines appear at an angle.
skewY
Defines a skew along the Y axis
angle degrees defining a skew
of the Y position by X*tan(angle)
skewY(angle)
The skewY transformation "pushes" all
the y-coordinates by the specified angle. Visually,
this makes horizontal lines appear at an angle.
Code Example
SVG Image
<?xml version="1.0"
standalone="no"?>
Right-click
on the image to open the SVG viewer pop-up menu.
Click 'view SVG' to display the image in a new, full
window to zoom & pan the image.
(SVG Viewer Tips)
<!DOCTYPE svg PUBLIC "-//W3C//DTD
SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
width="500" height="500">
<!--
Scale Example - Center of scaling -->
<circle cx="50"
cy="50" r="2" style="fill:red"/>
<!--Scaled
rectangle around a center point -->
<use xlink:href="#box"
transform="translate(-50,-50) scale(2)"
/>
<use xlink:href="#box" transform="translate(-100,-100)
scale(3)" />
<!--Show effects of skewX and skewY
-->
<!-- Establish a new coordinate system whose origin
is at (30,30) in the initial coordinate system and
which is skewed in X by 30 degrees. -->