本文整理匯總了Java中org.newdawn.slick.Image.getFlippedCopy方法的典型用法代碼示例。如果您正苦於以下問題:Java Image.getFlippedCopy方法的具體用法?Java Image.getFlippedCopy怎麽用?Java Image.getFlippedCopy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.newdawn.slick.Image
的用法示例。
在下文中一共展示了Image.getFlippedCopy方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: render
import org.newdawn.slick.Image; //導入方法依賴的package包/類
/**
* @see org.newdawn.slick.BasicGame#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g) {
image.draw(0,0);
image.draw(500,0,200,100);
scaleMe.draw(500,100,200,100);
scaled.draw(400,500);
Image flipped = scaled.getFlippedCopy(true, false);
flipped.draw(520,500);
Image flipped2 = flipped.getFlippedCopy(false, true);
flipped2.draw(520,380);
Image flipped3 = flipped2.getFlippedCopy(true, false);
flipped3.draw(400,380);
for (int i=0;i<3;i++) {
subImage.draw(200+(i*30),300);
}
g.translate(500, 200);
g.rotate(50, 50, rot);
g.scale(0.3f,0.3f);
image.draw();
g.resetTransform();
}
示例2: render
import org.newdawn.slick.Image; //導入方法依賴的package包/類
/**
* @see org.newdawn.slick.BasicGame#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g) {
g.drawRect(0,0,image.getWidth(),image.getHeight());
image.draw(0,0);
image.draw(500,0,200,100);
scaleMe.draw(500,100,200,100);
scaled.draw(400,500);
Image flipped = scaled.getFlippedCopy(true, false);
flipped.draw(520,500);
Image flipped2 = flipped.getFlippedCopy(false, true);
flipped2.draw(520,380);
Image flipped3 = flipped2.getFlippedCopy(true, false);
flipped3.draw(400,380);
for (int i=0;i<3;i++) {
subImage.draw(200+(i*30),300);
}
g.translate(500, 200);
g.rotate(50, 50, rot);
g.scale(0.3f,0.3f);
image.draw();
g.resetTransform();
rotImage.setRotation(rot);
rotImage.draw(100, 200);
}