public ShadowBox() { super( Assets.SHADOW, 1 ); //If this is the first time the texture is generated, set the filtering if (texture.id == -1) texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR ); scale.set( SIZE, SIZE ); }
public ShadowBox() { super( Assets.SHADOW, 1 ); //If this is the first time the texture is generated, set the filtering if (texture.id == -1) texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR ); scale.set( SIZE, SIZE ); }
public ShadowBox() { super( Assets.SHADOW, 1 ); texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR ); scale.set( SIZE, SIZE ); }
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 SmartTexture( Bitmap bitmap, int filtering, int wrapping ) { super(); bitmap( bitmap ); filter( filtering, filtering ); wrap( wrapping, wrapping ); }
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 ); }
add( fLight ); bLight.texture.filter( Texture.LINEAR, Texture.LINEAR );
add( fLight ); bLight.texture.filter( Texture.LINEAR, Texture.LINEAR );
add( fLight ); bLight.texture.filter( Texture.LINEAR, Texture.LINEAR );