Java Code Examples for com.watabou.glwrap.Matrix#translate()
The following examples show how to use
com.watabou.glwrap.Matrix#translate() .
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: Visual.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
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 2
Source File: ItemSprite.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@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 3
Source File: CharSprite.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@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 4
Source File: RenderedText.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override protected void updateMatrix() { super.updateMatrix(); //sometimes the font is rendered oddly, so we offset here to put it in the correct spot if (renderedHeight != height) { Matrix.translate(matrix, 0, Math.round(height - renderedHeight)); } }
Example 5
Source File: Visual.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
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 6
Source File: BitmapText.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@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 7
Source File: Visual.java From PD-classes with GNU General Public License v3.0 | 5 votes |
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 8
Source File: BitmapText.java From PD-classes with GNU General Public License v3.0 | 5 votes |
@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 9
Source File: SystemText.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
@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 YetAnotherPixelDungeon with GNU General Public License v3.0 | 5 votes |
@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: BitmapText.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
@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 12
Source File: ItemSprite.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@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 13
Source File: CharSprite.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@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 14
Source File: RenderedText.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override protected void updateMatrix() { super.updateMatrix(); //sometimes the font is rendered oddly, so we offset here to put it in the correct spot if (renderedHeight != height) { Matrix.translate(matrix, 0, Math.round(height - renderedHeight)); } }
Example 15
Source File: Visual.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
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 16
Source File: BitmapText.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@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 17
Source File: Visual.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 5 votes |
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); }