If you think the Android project RadaeePDF-B4A listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.radaee.pdf;
/*www.java2s.com*//**
class for PDF Matrix.
@author Radaee
@version 1.1
*/publicclass Matrix
{
protectedint hand = 0;
privatestaticnativeint create( float xx, float yx, float xy, float yy, float x0, float y0 );
privatestaticnativeint createScale( float sx, float sy, float x0, float y0 );
privatestaticnativevoid invert( int matrix );
privatestaticnativevoid transformPath( int matrix, int path );
privatestaticnativevoid transformInk( int matrix, int ink );
privatestaticnativevoid transformRect( int matrix, float[] rect );
privatestaticnativevoid transformPoint( int matrix, float[] point );
privatestaticnativevoid destroy( int matrix );
/**
* constructor for full values.
* @param xx
* @param yx
* @param xy
* @param yy
* @param x0
* @param y0
*/public Matrix( float xx, float yx, float xy, float yy, float x0, float y0 )
{
hand = create( xx, yx, xy, yy, x0, y0 );
}
/**
* constructor for scaled values.<br/>
* xx = sx;<br/>
* yx = 0;<br/>
* xy = 0;<br/>
* yx = sy;
* @param sx
* @param sy
* @param x0
* @param y0
*/public Matrix( float sx, float sy, float x0, float y0 )
{
hand = createScale( sx, sy, x0, y0 );
}
publicvoid Invert()
{
invert( hand );
}
publicvoid TransformPath( Path path )
{
transformPath( hand, path.m_hand );
}
publicvoid TransformInk( Ink ink )
{
transformInk( hand, ink.hand );
}
publicvoid TransformRect( float[] rect )
{
transformRect( hand, rect );
}
publicvoid TransformPoint( float[] point )
{
transformPoint( hand, point );
}
/**
* destroy and free memory.
*/publicvoid Destroy()
{
destroy( hand );
hand = 0;
}
}