List of usage examples for com.badlogic.gdx.graphics Pixmap Pixmap
public Pixmap(byte[] encodedData, int offset, int len)
From source file:YOGOSec.core.gui.ProgressBar.java
License:LGPL
@Override public void onGUIResized(int width, int height) { super.onGUIResized(width, height); this.pixmap = new Pixmap((int) (this.getWidth()), (int) this.getHeight(), Pixmap.Format.RGBA8888); this.update(); }
From source file:zzz.box2dtest.ViewportTest2.java
License:Apache License
public void create() { font = new BitmapFont(); font.setColor(0, 0, 0, 1);/*from ww w . java2s . co m*/ Pixmap pixmap = new Pixmap(16, 16, Format.RGBA8888); pixmap.setColor(1, 1, 1, 1); pixmap.fill(); texture = new Texture(pixmap); batch = new SpriteBatch(); camera = new OrthographicCamera(); camera.position.set(100, 100, 0); camera.update(); viewports = getViewports(camera); viewport = viewports.first(); names = getViewportNames(); name = names.first(); Gdx.input.setInputProcessor(new InputAdapter() { public boolean keyDown(int keycode) { if (keycode == Input.Keys.SPACE) { int index = (viewports.indexOf(viewport, true) + 1) % viewports.size; name = names.get(index); viewport = viewports.get(index); resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } return false; } }); }