Interface RenderingBo
-
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ControlRenderingBo
,DrawEffectRenderingBo
,DrawFontRenderingBo
,DrawImageRenderingBo
,DrawTestRenderingBo
,DrawTileCableRenderingBo
,DrawTileEffectRenderingBo
,DrawTileHighlightRenderingBo
,DrawTileImageBo
,DrawTilePixmapRenderingBo
,DrawTileRasterRenderingBo
,DrawWindowRenderingBo
,RenderingBoHasDimension
,RenderingBoHasPositionRelativeToParent
,RenderingBoHasPositionWorldPos
,RenderingBoHasSubTileOffset
,RenderingBoScaledAbsolutePosition
public interface RenderingBo extends AutoCloseable
RenderingBo is the basic contract for all business objects (bo) implementing building blocks for rendering. For rendering stuff, usually you are acquiring an instance of an implementation of this interface via RenderingBoPool, set all properties and add it to ListrenderingBo which is passed to various callback methods that are part of the rendering pipeline. It is recommended to view my technical presentation on youtube about the game to learn more about how rendering works.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RenderingBoLayer
getLayer()
int
getLocalX()
int
getLocalY()
int
getX()
int
getY()
RenderingBo
setColor(RgbaColor color)
Sets a color you want to use for rendering.void
setEngineData(EngineData engineData)
RenderingBo
setLayer(RenderingBoLayer layer)
Sets the layer to render this bo on.RenderingBo
withPositionAbsoluteAnchorBottomLeft(int x, int y)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorBottomLeft(HasPosition2 position)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorBottomRight(int x, int y)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorBottomRight(HasPosition2 position)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorTopLeft(int x, int y)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorTopLeft(HasPosition2 position)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorTopRight(int x, int y)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionAbsoluteAnchorTopRight(HasPosition2 position)
Positions this bo with an absolute position on the viewport.RenderingBo
withPositionIncrementalAbsolute(int x, int y)
Positions this bo with an incremental position relative to the position the bo is already at.RenderingBo
withPositionIncrementalAbsolute(HasPosition2 position)
Positions this bo with an incremental position relative to the position the bo is already at.RenderingBo
withPositionIncrementalPercentual(double x, double y)
Positions this bo with a percenutal position relative to the position the bo is already at.RenderingBo
withPositionPercentual(double x, double y)
Positions this bo with a percentual position on the viewport.RenderingBo
withPositionRelative(int x, int y)
Positions this bo relative to it's parent.RenderingBo
withPositionRelative(HasPosition2 position)
Positions this bo relative to it's parent.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
setEngineData
void setEngineData(EngineData engineData)
-
setColor
RenderingBo setColor(RgbaColor color)
Sets a color you want to use for rendering. It depends on the rendering bo how this information is treated.
-
getX
int getX()
-
getY
int getY()
-
getLocalX
int getLocalX()
-
getLocalY
int getLocalY()
-
setLayer
RenderingBo setLayer(RenderingBoLayer layer)
Sets the layer to render this bo on. Business objects are rendered layered on top of each other in the natural order of RenderingBoLayer enum fields. Objects on the same layer are rendered in the order of being added to ListrenderingBo .
-
getLayer
RenderingBoLayer getLayer()
-
withPositionAbsoluteAnchorTopLeft
RenderingBo withPositionAbsoluteAnchorTopLeft(int x, int y)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the top left. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorTopLeft
RenderingBo withPositionAbsoluteAnchorTopLeft(HasPosition2 position)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the top left. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorTopRight
RenderingBo withPositionAbsoluteAnchorTopRight(int x, int y)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the top right. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorTopRight
RenderingBo withPositionAbsoluteAnchorTopRight(HasPosition2 position)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the top right. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorBottomLeft
RenderingBo withPositionAbsoluteAnchorBottomLeft(int x, int y)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the bottom left. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorBottomLeft
RenderingBo withPositionAbsoluteAnchorBottomLeft(HasPosition2 position)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the bottom left. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorBottomRight
RenderingBo withPositionAbsoluteAnchorBottomRight(int x, int y)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the bottom right. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionAbsoluteAnchorBottomRight
RenderingBo withPositionAbsoluteAnchorBottomRight(HasPosition2 position)
Positions this bo with an absolute position on the viewport. x0 y0 coordinates are at the bottom right. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionPercentual
RenderingBo withPositionPercentual(double x, double y)
Positions this bo with a percentual position on the viewport.- Parameters:
x
- Range 0.0 (left) to 1.0 (right)y
- Range 0.0 (top) to 1.0 (bottom)
-
withPositionIncrementalAbsolute
RenderingBo withPositionIncrementalAbsolute(int x, int y)
Positions this bo with an incremental position relative to the position the bo is already at. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionIncrementalAbsolute
RenderingBo withPositionIncrementalAbsolute(HasPosition2 position)
Positions this bo with an incremental position relative to the position the bo is already at. Call RendererControl#getEffectiveViewportDimension to get the absolute dimension of the viewport.
-
withPositionIncrementalPercentual
RenderingBo withPositionIncrementalPercentual(double x, double y)
Positions this bo with a percenutal position relative to the position the bo is already at.
-
withPositionRelative
RenderingBo withPositionRelative(int x, int y)
Positions this bo relative to it's parent. This can be for example the game world for positioning tiles or a composite entity. Unit is usually not pixels but the position in the tile raster.
-
withPositionRelative
RenderingBo withPositionRelative(HasPosition2 position)
Positions this bo relative to it's parent. This can be for example game world for positioning tiles or a composite entity. Unit is usually not pixels but the position in the tile raster.
-
-