Skip to main content
fluff removed as per https://meta.stackexchange.com/q/2950/295232
Source Link

For Texture:


public void draw ( Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY ); 

Solution:

override fun draw(batch: Batch, parentAlpha: Float) { batch.draw(previewTexture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, 0, 0, yourTexture.width, yourTexture.height, false, false) } 

PS. Vel_daN: Love what You DO 💚.

For Texture:


public void draw ( Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY ); 

Solution:

override fun draw(batch: Batch, parentAlpha: Float) { batch.draw(previewTexture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, 0, 0, yourTexture.width, yourTexture.height, false, false) } 

PS. Vel_daN: Love what You DO 💚.

For Texture:


public void draw ( Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY ); 

Solution:

override fun draw(batch: Batch, parentAlpha: Float) { batch.draw(previewTexture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, 0, 0, yourTexture.width, yourTexture.height, false, false) } 
Source Link

For Texture:


public void draw ( Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY ); 

Solution:

override fun draw(batch: Batch, parentAlpha: Float) { batch.draw(previewTexture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, 0, 0, yourTexture.width, yourTexture.height, false, false) } 

PS. Vel_daN: Love what You DO 💚.