Class FImageTree

java.lang.Object
fr.formiko.usual.structures.Tree<BufferedImage>
fr.formiko.usual.structures.ImageTree
fr.formiko.formiko.images.FImageTree
All Implemented Interfaces:
Serializable, Iterable<BufferedImage>

public class FImageTree extends fr.formiko.usual.structures.ImageTree
Custom Tree class using Generics.
This class have many function using Formiko Objects.
Author:
Hydrolien
See Also:
  • Constructor Details

    • FImageTree

      public FImageTree()
  • Method Details

    • copyStructure

      public FImageTree copyStructure()
      Copy the structure of a given Tree. content of node will not be copy.
      Overrides:
      copyStructure in class fr.formiko.usual.structures.ImageTree
    • getCreatureImage

      public BufferedImage getCreatureImage(Creature c, int antColorLevel)
      Return the Image that fit to a Creature.
      Parameters:
      c - the Creature to represent.
    • createAntImageFromNode

      public static BufferedImage createAntImageFromNode(Creature c, fr.formiko.usual.structures.TreeNode<BufferedImage> node, int antColorLevel)
      Create an ant Image from the coresponding node, with the Creature color.
      Parameters:
      c - Creature that will be used for color
      node -
    • getScaledInstanceFromTree

      public static FImageTree getScaledInstanceFromTree(FImageTree treeIn, int dim)
      Return the scaled instance of this tree. content of node that correspond to Creature image will be copy.
    • addScaledInsect

      private static void addScaledInsect(fr.formiko.usual.structures.listes.Liste<fr.formiko.usual.structures.TreeNode<BufferedImage>> insectListIn, fr.formiko.usual.structures.listes.Liste<fr.formiko.usual.structures.TreeNode<BufferedImage>> insectListOut, int dim)
      Return the scaled instance of the Insect part. content of node that correspond to Creature image will be copy.
    • addScaledAnt

      private static void addScaledAnt(fr.formiko.usual.structures.listes.Liste<fr.formiko.usual.structures.TreeNode<BufferedImage>> antListIn, fr.formiko.usual.structures.listes.Liste<fr.formiko.usual.structures.TreeNode<BufferedImage>> antListOut, int dim)
      Return the scaled instance of the Ant part. content of node that correspond to Creature image will be copy.
    • addScaledAntColorPart

      private static void addScaledAntColorPart(fr.formiko.usual.structures.TreeNode<BufferedImage> currentNodeIn, fr.formiko.usual.structures.TreeNode<BufferedImage> currentNodeOut, int dim, int size)
      Return the scaled color of the Ant.
      It can return null if color is disable in Options. Color image will be edit to whithout transparency image if Ant color level is 1 in Options.
    • addScaledAntOtherPart

      private static void addScaledAntOtherPart(fr.formiko.usual.structures.TreeNode<BufferedImage> currentNodeIn, fr.formiko.usual.structures.TreeNode<BufferedImage> currentNodeOut, int dim, int size)
      Return the scaled part of the body of the Ant.