本文整理汇总了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;
}