|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.parsers.svg.SVGMatrix
public class SVGMatrix
Defines a matrix according to the SVG specifications.
This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
10/16/07
Field Summary | |
---|---|
protected double |
a
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
protected double |
b
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
protected double |
c
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
protected double |
d
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
protected double |
e
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
protected double |
f
[a, c, e, b, d, f, 0, 0, 1] An element of the matrix. |
static int |
HEIGHT
|
static int |
WIDTH
|
Constructor Summary | |
---|---|
SVGMatrix()
Creates a matrix by initialising it as the identity. |
Method Summary | |
---|---|
double |
getA()
|
double |
getB()
|
double |
getC()
|
double |
getD()
|
double |
getE()
|
double |
getF()
|
void |
initMatrix()
Initialises the matrix as the identity. |
SVGMatrix |
multiply(SVGMatrix m)
|
void |
rotate(double angle)
Rotates the matrix (without reinitialisation). |
void |
scale(double scaleFactor)
Scales the matrix (without reinitialisation). |
void |
scaleNonUniform(double scaleFactorX,
double scaleFactorY)
Scales the matrix (without reinitialisation). |
void |
setMatrix(double a,
double b,
double c,
double d,
double e,
double f)
Sets the matrix with the given values. |
void |
skewX(double angle)
Skews the matrix (without reinitialisation). |
void |
skewY(double angle)
Skews the matrix (without reinitialisation). |
java.lang.String |
toString()
|
void |
translate(double x,
double y)
Translates the matrix (without reinitialisation). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int WIDTH
public static final int HEIGHT
protected double a
protected double b
protected double c
protected double d
protected double e
protected double f
Constructor Detail |
---|
public SVGMatrix()
Method Detail |
---|
public void initMatrix()
public void rotate(double angle)
angle
- The angle of rotation (in radian).public void translate(double x, double y)
x
- The x translation.y
- The y translation.public void scale(double scaleFactor)
scaleFactor
- The scale factor.public void scaleNonUniform(double scaleFactorX, double scaleFactorY)
scaleFactorX
- The x scale factor.scaleFactorY
- The y scale factor.public void skewX(double angle)
angle
- The X angle.public void skewY(double angle)
angle
- The Y angle.public SVGMatrix multiply(SVGMatrix m)
m
- The matrix to multiply to the called matrix: this * m = out. Or null if m is null.
public void setMatrix(double a, double b, double c, double d, double e, double f)
a
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].b
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].c
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].d
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].e
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].f
- The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].public double getA()
public double getB()
public double getC()
public double getD()
public double getE()
public double getF()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |