feat(renderer): add withVisibleArea method for clipping area in RenderingBo interface
This commit is contained in:
@@ -117,6 +117,11 @@ public interface RenderingBo extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
RenderingBo withPositionRelative(HasPosition2 position);
|
RenderingBo withPositionRelative(HasPosition2 position);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a visible area (clipping area) for this rendering bo. Coordinates are absolute viewport coordinates.
|
||||||
|
*/
|
||||||
|
RenderingBo withVisibleArea(int x, int y, int width, int height);
|
||||||
|
|
||||||
void apply(RenderingBo other);
|
void apply(RenderingBo other);
|
||||||
|
|
||||||
void staticCleanupAfterFrame();
|
void staticCleanupAfterFrame();
|
||||||
|
|||||||
@@ -26,6 +26,5 @@ public interface RenderingBoHasDimension extends RenderingBo {
|
|||||||
RenderingBoHasDimension withDimensionIncrementalAbsolute(int width, int height);
|
RenderingBoHasDimension withDimensionIncrementalAbsolute(int width, int height);
|
||||||
|
|
||||||
RenderingBoHasDimension withDimensionIncrementalPercentual(double width, double height);
|
RenderingBoHasDimension withDimensionIncrementalPercentual(double width, double height);
|
||||||
|
|
||||||
RenderingBoHasDimension withVisibleArea(int x, int y, int width, int height);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,6 +624,11 @@ public class RendererWorkingSetImplTest {
|
|||||||
public RenderingBo withPositionRelative(final HasPosition2 position) {
|
public RenderingBo withPositionRelative(final HasPosition2 position) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RenderingBo withVisibleArea(int x, int y, int width, int height) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void staticCleanupAfterFrame() {
|
public void staticCleanupAfterFrame() {
|
||||||
|
|||||||
@@ -422,6 +422,11 @@ public class RenderingBoPoolImplTest {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RenderingBo withVisibleArea(final int x, final int y, final int width, final int height) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRendererData(final RendererData rendererData) {
|
public void setRendererData(final RendererData rendererData) {
|
||||||
this.rendererData = rendererData;
|
this.rendererData = rendererData;
|
||||||
@@ -581,6 +586,11 @@ public class RenderingBoPoolImplTest {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RenderingBo withVisibleArea(final int x, final int y, final int width, final int height) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRendererData(final RendererData rendererData) {
|
public void setRendererData(final RendererData rendererData) {
|
||||||
this.rendererData = rendererData;
|
this.rendererData = rendererData;
|
||||||
|
|||||||
Reference in New Issue
Block a user