public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
public SmartTexture( Bitmap bitmap, int filtering, int wrapping ) { super(); bitmap( bitmap ); filter( filtering, filtering ); wrap( wrapping, wrapping ); }
public synchronized static SmartTexture createGradient( int... colors ) { final String key = "" + colors; if (all.containsKey( key )) { return all.get( key ); } else { Bitmap bmp = Bitmap.createBitmap( colors.length, 1, Bitmap.Config.ARGB_8888 ); for (int i=0; i < colors.length; i++) { bmp.setPixel( i, 0, colors[i] ); } SmartTexture tx = new SmartTexture( bmp ); tx.filter( Texture.LINEAR, Texture.LINEAR ); tx.wrap( Texture.CLAMP, Texture.CLAMP ); all.put( key, tx ); return tx; } }
public void reload() { id = new SmartTexture( bitmap ).id; filter( fModeMin, fModeMax ); wrap( wModeH, wModeV ); }
public synchronized static SmartTexture createGradient( int... colors ) { final String key = "" + colors; if (all.containsKey( key )) { return all.get( key ); } else { Pixmap pixmap = new Pixmap( colors.length, 1, Pixmap.Format.RGBA8888); for (int i=0; i < colors.length; i++) { // In the rest of the code ARGB is used pixmap.drawPixel( i, 0, (colors[i] << 8) | (colors[i] >>> 24) ); } SmartTexture tx = new SmartTexture( pixmap ); tx.filter( Texture.LINEAR, Texture.LINEAR ); tx.wrap( Texture.CLAMP, Texture.CLAMP ); all.put( key, tx ); return tx; } }
@Override protected void generate() { super.generate(); bitmap( bitmap, premultiplied ); filter( fModeMin, fModeMax ); wrap( wModeH, wModeV ); }