Interface Viewport

All Superinterfaces:
ViewportDimension, ViewportHeightAccessor, ViewportWidthAccessor

public interface Viewport extends ViewportDimension
The Viewport defines some elementary functionality regarding a Viewport being the visible rectangle of a big scene..
  • Method Details

    • centerViewortOffset

      void centerViewortOffset(int aPositionX, int aPositionY)
      Centers the viewport around the provided positions as best as possoble while keeping the viewport in bounds of the grid.
      Parameters:
      aPositionX - The x position to which to center the viewport.
      aPositionY - The y position to which to center the viewport.
    • centerViewortOffset

      void centerViewortOffset(int aPositionX, int aPositionY, int aViewportWidth, int aViewportHeight)
      Centers the viewport around the provided positions as best as possoble while keeping the viewport in bounds of the grid.
      Parameters:
      aPositionX - The x position to which to center the viewport.
      aPositionY - The y position to which to center the viewport.
      aViewportWidth - The viewport width to use (overrides the actual viewport width).
      aViewportHeight - The viewport height to use (overrides the actual viewport height).