本文整理匯總了Java中com.badlogic.gdx.graphics.Pixmap.fillCircle方法的典型用法代碼示例。如果您正苦於以下問題:Java Pixmap.fillCircle方法的具體用法?Java Pixmap.fillCircle怎麽用?Java Pixmap.fillCircle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.graphics.Pixmap
的用法示例。
在下文中一共展示了Pixmap.fillCircle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PlayerAnimation
import com.badlogic.gdx.graphics.Pixmap; //導入方法依賴的package包/類
public PlayerAnimation() {
nullRegion = new TextureRegion(new Texture(new Pixmap(1, 1, Pixmap.Format.RGBA8888)));
for (int i = 0; i < regions.length; i++) {
Pixmap pixmap = new Pixmap(64, 64, Pixmap.Format.RGBA8888);
pixmap.setColor(0, 0, 1, 1);
pixmap.fillCircle(32, 32, 10);
pixmap.setColor(1, 1, 1, 1);
pixmap.fillCircle(32, 32, 5);
pixmap.setColor(1, 1, 1, 0.5f);
pixmap.drawCircle(32, 32, (int) (i * 3f) + 7);
pixmap.setColor(1, 1, 1, 1f);
pixmap.drawCircle(32, 32, (int) (i * 3f) + 8);
pixmap.setColor(1, 1, 1, 0.5f);
pixmap.drawCircle(32, 32, (int) (i * 3f) + 9);
regions[i] = new TextureRegion(new Texture(pixmap));
pixmap.dispose();
}
setRegion(regions[0]);
}
示例2: Halo
import com.badlogic.gdx.graphics.Pixmap; //導入方法依賴的package包/類
public Halo() {
super();
if (!TextureCache.contains( CACHE_KEY )) {
Pixmap pixmap = new Pixmap(RADIUS * 2, RADIUS * 2, Pixmap.Format.RGBA8888);
pixmap.setColor( 0xFFFFFFFF );
pixmap.fillCircle( RADIUS, RADIUS, (int) (RADIUS * 0.75f));
pixmap.setColor( 0xFFFFFF88 );
pixmap.fillCircle( RADIUS, RADIUS, RADIUS );
GdxTexture bmp = new GdxTexture(pixmap);
TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) );
}
texture( CACHE_KEY );
origin.set( RADIUS );
}
示例3: createMoonSprite
import com.badlogic.gdx.graphics.Pixmap; //導入方法依賴的package包/類
public Sprite createMoonSprite(int size) {
Pixmap pixmap = new Pixmap(size, size, Pixmap.Format.RGBA8888);
// pixmap.setColor(color);
pixmap.setColor(Color.WHITE);
pixmap.fillCircle(pixmap.getWidth()/2, pixmap.getHeight()/2, size / 2 - 1);
Sprite sprite = new Sprite(new Texture(pixmap));
pixmap.dispose();
return sprite;
}