- All Superinterfaces:
ViewportDimension
,ViewportHeightAccessor
,ViewportWidthAccessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.graphical.ViewportDimension
ViewportDimension.ViewportDimensionAccessor, ViewportDimension.ViewportDimensionBuilder<B extends ViewportDimension.ViewportDimensionBuilder<B>>, ViewportDimension.ViewportDimensionMutator, ViewportDimension.ViewportDimensionProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.ViewportHeightAccessor
ViewportHeightAccessor.ViewportHeightBuilder<B extends ViewportHeightAccessor.ViewportHeightBuilder<B>>, ViewportHeightAccessor.ViewportHeightMutator, ViewportHeightAccessor.ViewportHeightProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.ViewportWidthAccessor
ViewportWidthAccessor.ViewportWidthBuilder<B extends ViewportWidthAccessor.ViewportWidthBuilder<B>>, ViewportWidthAccessor.ViewportWidthMutator, ViewportWidthAccessor.ViewportWidthProperty
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.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.Methods inherited from interface org.refcodes.graphical.ViewportHeightAccessor
getViewportHeight
Methods inherited from interface org.refcodes.graphical.ViewportWidthAccessor
getViewportWidth
-
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).
-