Class RectanglePacker.Skyline

java.lang.Object
icyllis.arc3d.core.RectanglePacker
icyllis.arc3d.core.RectanglePacker.Skyline
Enclosing class:
RectanglePacker

public static final class RectanglePacker.Skyline extends RectanglePacker
Tracks the current silhouette, optimized.
  • Constructor Details

    • Skyline

      public Skyline(int width, int height)
      Constructor assumes both width and height are in the range 1..32768.
      Parameters:
      width - the max width
      height - the max height
  • Method Details

    • clear

      public void clear()
      Description copied from class: RectanglePacker
      Clears all the tracked data.
      Specified by:
      clear in class RectanglePacker
    • addRect

      public boolean addRect(Rect2i rect)
      Description copied from class: RectanglePacker
      Decides upon an (x, y) position for the given rectangle (leaving its width and height unchanged).
      Specified by:
      addRect in class RectanglePacker
      Returns:
      true on success; false on failure