Java Code Examples for com.watabou.glwrap.Matrix#scale()

The following examples show how to use com.watabou.glwrap.Matrix#scale() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BitmapText.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
Example 2
Source File: Visual.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	Matrix.translate(matrix, -origin.x, -origin.y);
}
 
Example 3
Source File: BitmapText.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
Example 4
Source File: Visual.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, -origin.x, -origin.y );
}
 
Example 5
Source File: CharSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	super.updateMatrix();
	Matrix.copy(matrix, shadowMatrix);
	Matrix.translate(shadowMatrix,
			(width * (1f - shadowWidth)) / 2f,
			(height * (1f - shadowHeight)) + shadowOffset);
	Matrix.scale(shadowMatrix, shadowWidth, shadowHeight);
}
 
Example 6
Source File: ItemSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	super.updateMatrix();
	Matrix.copy(matrix, shadowMatrix);
	Matrix.translate(shadowMatrix,
			(width() * (1f - shadowWidth)) / 2f,
			(height() * (1f - shadowHeight)) + shadowOffset);
	Matrix.scale(shadowMatrix, shadowWidth, shadowHeight);
}
 
Example 7
Source File: BitmapText.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
Example 8
Source File: Visual.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	Matrix.translate( matrix, -origin.x, -origin.y );
}
 
Example 9
Source File: SystemText.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity(matrix);
	Matrix.translate(matrix, x, y);
	Matrix.scale(matrix, scale.x, scale.y);
	Matrix.rotate(matrix, angle);
}
 
Example 10
Source File: BitmapText.java    From PD-classes with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
Example 11
Source File: Visual.java    From PD-classes with GNU General Public License v3.0 5 votes vote down vote up
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	Matrix.translate( matrix, -origin.x, -origin.y );
}
 
Example 12
Source File: BitmapText.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
Example 13
Source File: Visual.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, -origin.x, -origin.y );
}
 
Example 14
Source File: CharSprite.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	super.updateMatrix();
	Matrix.copy(matrix, shadowMatrix);
	Matrix.translate(shadowMatrix,
			(width() * (1f - shadowWidth)) / 2f,
			(height() * (1f - shadowHeight)) + shadowOffset);
	Matrix.scale(shadowMatrix, shadowWidth, shadowHeight);
}
 
Example 15
Source File: ItemSprite.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void updateMatrix() {
	super.updateMatrix();
	Matrix.copy(matrix, shadowMatrix);
	Matrix.translate(shadowMatrix,
			(width() * (1f - shadowWidth)) / 2f,
			(height() * (1f - shadowHeight)) + shadowOffset);
	Matrix.scale(shadowMatrix, shadowWidth, shadowHeight);
}