|
static int | applyMatrixTo (NBitmap dst, NBitmap src, TM m, InterpolatorType i) |
|
static TM | getTranslationMatrix (double dx, double dy) |
|
static TM | getRotationMatrix (double alpha) |
|
static TM | getScaleMatrix (double x, double y) |
|
static TM | getShearMatrix (double x, double y) |
|
static TM | getProjectiveMatrix (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) |
|
|
static native int | applyMatrixTo (int nativeType, long dstAdress, long srcAdress, int interpolatorType, double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33) |
|
Definition at line 9 of file Transform.java.
mhr.appcore.transform.Transform.Transform |
( |
| ) |
|
|
inlineprotected |
static native int mhr.appcore.transform.Transform.applyMatrixTo |
( |
int |
nativeType, |
|
|
long |
dstAdress, |
|
|
long |
srcAdress, |
|
|
int |
interpolatorType, |
|
|
double |
a11, |
|
|
double |
a12, |
|
|
double |
a13, |
|
|
double |
a21, |
|
|
double |
a22, |
|
|
double |
a23, |
|
|
double |
a31, |
|
|
double |
a32, |
|
|
double |
a33 |
|
) |
| |
|
staticprotected |
Definition at line 34 of file Transform.java.
{
NativeType type = src.getNativeType();
if (type == dst.getNativeType() && type != NativeType.INVALID_TYPE) {
return applyMatrixTo(src.getNativeType().getValue(), dst.getAdress(), src.getAdress(), i.getValue(),
m.a11, m.a12, m.a13,
m.a21, m.a22, m.a23,
m.a31, m.a32, m.a33);
} else {
throw new IllegalArgumentException("Operation is not applicable to suplied NBitmaps.");
}
}
static TM mhr.appcore.transform.Transform.getProjectiveMatrix |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
double |
x3, |
|
|
double |
y3, |
|
|
double |
x4, |
|
|
double |
y4 |
|
) |
| |
|
inlinestatic |
Definition at line 75 of file Transform.java.
{
TM m = new TM();
m.a13 = ((x1 - x2 + x4 - x3) * (y3 - y4) - (y1 - y2 + y4 - y3) * (x3 - x4)) / ((x2 - x4) * (y3 - y4) - (x3 - x4) * (y2 - y4));
m.a23 = ((y1 - y2 + y4 - y3) * (x2 - x4) - (x1 - x2 + x4 - x3) * (y2 - y4)) / ((x2 - x4) * (y3 - y4) - (x3 - x4) * (y2 - y4));
m.a11 = x2 - x1 + m.a13 * x2;
m.a21 = x3 - x1 + m.a23 * x3;
m.a31 = x1;
m.a12 = y2 - y1 + m.a13 * y2;
m.a22 = y3 - y1 + m.a23 * y3;
m.a32 = y1;
m.a33 = 1;
return m;
}
static TM mhr.appcore.transform.Transform.getRotationMatrix |
( |
double |
alpha | ) |
|
|
inlinestatic |
Definition at line 57 of file Transform.java.
{
return new TM( Math.cos(alpha), Math.sin(alpha), 0,
-Math.sin(alpha), Math.cos(alpha), 0,
0, 0, 1);
}
static TM mhr.appcore.transform.Transform.getScaleMatrix |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inlinestatic |
Definition at line 63 of file Transform.java.
{
return new TM( x, 0, 0,
0, y, 0,
0, 0, 1);
}
static TM mhr.appcore.transform.Transform.getShearMatrix |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inlinestatic |
Definition at line 69 of file Transform.java.
{
return new TM( 1, y, 0,
x, 1, 0,
0, 0, 1);
}
static TM mhr.appcore.transform.Transform.getTranslationMatrix |
( |
double |
dx, |
|
|
double |
dy |
|
) |
| |
|
inlinestatic |
Definition at line 51 of file Transform.java.
{
return new TM( 1, 0, 0,
0, 1, 0,
dx, dy, 1);
}
The documentation for this class was generated from the following file:
- /home/xxx/eclipse_workspaces/app/appcore/src/mhr/appcore/transform/Transform.java