#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
| HxImageRep L_HXIMAGEREP | HxRotate (HxImageRep img, double alpha, HxGeoIntType gi=LINEAR, int adjustSize=1, HxValue background=HxValue(0)) |
| Rotation (around Z-axis in middle of image). More... | |
|
||||||||||||||||||||||||
|
Rotation (around Z-axis in middle of image). This is the normal rotation in 2D. Alpha in degrees.
00016 {
00017 if (img.dimensionality() == 2) {
00018 HxMatrix m =
00019 HxMatrix::translate2d(
00020 img.dimensionSize(1)/2, img.dimensionSize(2)/2) *
00021 HxMatrix::rotate2dDeg(-alpha) * // Y-axis points down
00022 HxMatrix::translate2d(
00023 -img.dimensionSize(1)/2, -img.dimensionSize(2)/2);
00024 return img.geometricOp2d(m, gi, FORWARD, adjustSize, background);
00025 } else {
00026 HxEnvironment::instance()->errorStream()
00027 << "3d rotation not implemented yet" << STD_ENDL;
00028 HxEnvironment::instance()->flush();
00029 return HxImageRep();
00030 }
00031 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001