Interface Viewport
- All Superinterfaces:
ViewportDimension, ViewportHeightAccessor, ViewportWidthAccessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface ViewportDimension
ViewportDimension.ViewportDimensionAccessor, ViewportDimension.ViewportDimensionBuilder<B>, ViewportDimension.ViewportDimensionMutator, ViewportDimension.ViewportDimensionPropertyNested classes/interfaces inherited from interface ViewportHeightAccessor
ViewportHeightAccessor.ViewportHeightBuilder<B>, ViewportHeightAccessor.ViewportHeightMutator, ViewportHeightAccessor.ViewportHeightPropertyNested classes/interfaces inherited from interface ViewportWidthAccessor
ViewportWidthAccessor.ViewportWidthBuilder<B>, ViewportWidthAccessor.ViewportWidthMutator, ViewportWidthAccessor.ViewportWidthProperty -
Method Summary
Modifier and TypeMethodDescriptionvoidcenterViewportOffset(int aPositionX, int aPositionY) Centers the viewport around the provided positions as best as possoble while keeping the viewport in bounds of the grid.voidcenterViewportOffset(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.Methods inherited from interface ViewportHeightAccessor
getViewportHeightMethods inherited from interface ViewportWidthAccessor
getViewportWidth
-
Method Details
-
centerViewportOffset
void centerViewportOffset(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.
-
centerViewportOffset
void centerViewportOffset(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).
-