Examples of addFrame()


Examples of org.newdawn.slick.Animation.addFrame()

      Image img = sheet.getSubImage(frameIndex, row);

      if (flipHorizontal || flipVertical) {
        img = img.getFlippedCopy(flipHorizontal, flipVertical);
      }
      animation.addFrame(img, frameDuration);
    }
    return animation;
  }

  private void loadAngelCodeFont(Element element) throws SlickException {
View Full Code Here

Examples of org.newdawn.slick.Animation.addFrame()

                      }
                      if ("left".equals(elem.getName())) {
                        talking_left.addFrame(new Image(image.getAbsolutePath()), 180);
                      }
                      if ("right".equals(elem.getName())) {
                        talking_right.addFrame(new Image(image.getAbsolutePath()), 180);
                      }
                    } catch (SlickException e) {
                      e.printStackTrace();
                    }
                  }
View Full Code Here

Examples of org.nutz.repo.gif.AnimatedGifEncoder.addFrame()

            AnimatedGifEncoder e = new AnimatedGifEncoder();
            e.setRepeat(0);
            e.start(targetFile);
            for (String f : frameFiles) {
                e.setDelay(delay);
                e.addFrame(ImageIO.read(new File(f)));
            }
            return e.finish();
        }
        catch (Exception e) {
            return false;
View Full Code Here

Examples of org.obolibrary.oboformat.model.OBODoc.addFrame()

        String id = "TEST:0001";
        t.setId(id);
        t.addClause(new Clause(OboFormatTag.TAG_ID, id));
        String comment = "Comment with a '{' curly braces '}'";
        t.addClause(new Clause(OboFormatTag.TAG_COMMENT, comment));
        doc.addFrame(t);
        String oboString = renderOboToString(doc);
        assertTrue(oboString
                .contains("comment: Comment with a '\\{' curly braces '}'"));
        OBODoc doc2 = parseOboToString(oboString);
        assertEquals(comment,
View Full Code Here

Examples of orxanimeditor.data.v1.Animation.addFrame()

    if(e.getSource()==newFrameButton) {
      Animation selectedAnimation = getSelectedAnimation();
      Frame     selectedFrame = getSelectedFrame();
      if(selectedAnimation != null) {
        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        selectedAnimation.addFrame(newFrame);
      } else if(selectedFrame != null) {
        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        Animation parent = selectedFrame.getParent();
        parent.addFrame(newFrame, parent.getFrameIndex(selectedFrame)+1);
      } else return;
View Full Code Here

Examples of orxanimeditor.data.v1.Animation.addFrame()

        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        selectedAnimation.addFrame(newFrame);
      } else if(selectedFrame != null) {
        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        Animation parent = selectedFrame.getParent();
        parent.addFrame(newFrame, parent.getFrameIndex(selectedFrame)+1);
      } else return;
    }
    if(e.getSource()==newAnimationButton) {
      Animation newAnimation = new Animation("NewAnimation" + newAnimationSuffix++);
      editor.getData().addAnimation(newAnimation);
View Full Code Here

Examples of orxanimeditor.data.v1.Animation.addFrame()

      case KeyEvent.VK_V:
        for(Object node: clipboard) {
          Object nodeObject = node;
          Animation selectedAnimation = getSelectedAnimation();
          if(nodeObject instanceof Frame && selectedAnimation!=null) {
            selectedAnimation.addFrame(((Frame)nodeObject).clone());
          }
          if(nodeObject instanceof Animation) {
            editor.getData().addAnimation(((Animation)nodeObject).clone());
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.