Difference between revisions of "Animation"

From Progzoo
Jump to: navigation, search
(Moving block)
Line 11: Line 11:
  
 
   public static void main(String argv []){
 
   public static void main(String argv []){
     BufferedImage image = new BufferedImage(150,100, BufferedImage.TYPE_INT_ARGB);
+
     BufferedImage image = new BufferedImage(QwidthQ,QheightQ, BufferedImage.TYPE_INT_ARGB);
 
     Graphics2D g = image.createGraphics();
 
     Graphics2D g = image.createGraphics();
 
     try {
 
     try {
 
         Gif89Encoder genc = new Gif89Encoder();
 
         Gif89Encoder genc = new Gif89Encoder();
         for (int i=0;i<4;i++){
+
         for (int i=0;i<QframesQ;i++){
 
           drawFrame(g,i);
 
           drawFrame(g,i);
 
           genc.addFrame(image);
 
           genc.addFrame(image);
Line 32: Line 32:
 
</shell>
 
</shell>
 
==Moving block==
 
==Moving block==
<question copyFile="classes.jar" imgOut='anim.gif' width='150' height='100' className="Anim"
+
<question copyFile="classes.jar" imgOut='anim.gif'
 +
frames='10' width='150' height='100' className="Anim"
 
  classpath="classes.jar">
 
  classpath="classes.jar">
 
<prog>
 
<prog>

Revision as of 23:03, 15 November 2008

Moving block


[Font] [Default] [Show] [Resize] [History] [Profile]