Class TileBlock
java.lang.Object
org.apache.batik.ext.awt.image.rendered.TileBlock
This class is responsible for breaking up a block of tiles into
a set of smaller requests that are as large as possible without
rerequesting significant numbers of tiles that are already
available.
- Version:
- $Id: TileBlock.java 1831630 2018-05-15 12:56:55Z ssteiner $
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) int
(package private) int
(package private) boolean[]
(package private) int
(package private) int
(package private) int
(package private) int
(package private) int
(package private) int
-
Constructor Summary
ConstructorsConstructorDescriptionTileBlock
(int occX, int occY, int occW, int occH, boolean[] occupied, int xOff, int yOff, int w, int h) Construct a tile block this represents a block of contigous tiles. -
Method Summary
Modifier and TypeMethodDescription(package private) int
Return the number of new tiles computed.(package private) TileBlock[]
Returnes an optimized list of TileBlocks to generate that tries to minimize the work to benefit ratio, for the set of blocks defined by this block.(package private) int
Return the height of this block of tiles(package private) int
getWidth()
Return the width of this block of tiles(package private) int
getWork()
Return the approximate amount of work required to compute those tiles.(package private) static int
Returns the total amount of work for the array of tile blocks(package private) int
getXLoc()
Return the x location of this block of tiles(package private) int
getYLoc()
Return the y location of this block of tilesboolean
simplify()
toString()
Really nice to string that outlines what tiles are filled and what region this block covers.
-
Field Details
-
occX
int occX -
occY
int occY -
occW
int occW -
occH
int occH -
xOff
int xOff -
yOff
int yOff -
w
int w -
h
int h -
benefit
int benefit -
occupied
boolean[] occupied
-
-
Constructor Details
-
TileBlock
TileBlock(int occX, int occY, int occW, int occH, boolean[] occupied, int xOff, int yOff, int w, int h) Construct a tile block this represents a block of contigous tiles.- Parameters:
occupied
- Which entries in the block are already computed.xOff
- The x index of left edge of the tile block.yOff
- The y index of top edge of the tile block.w
- The number of tiles across in the blockh
- The number of tiles down the block
-
-
Method Details
-
toString
Really nice to string that outlines what tiles are filled and what region this block covers. Really useful for debugging the TileBlock stuff. -
getXLoc
int getXLoc()Return the x location of this block of tiles -
getYLoc
int getYLoc()Return the y location of this block of tiles -
getWidth
int getWidth()Return the width of this block of tiles -
getHeight
int getHeight()Return the height of this block of tiles -
getBenefit
int getBenefit()Return the number of new tiles computed. -
getWork
int getWork()Return the approximate amount of work required to compute those tiles. -
getWork
Returns the total amount of work for the array of tile blocks -
getBestSplit
TileBlock[] getBestSplit()Returnes an optimized list of TileBlocks to generate that tries to minimize the work to benefit ratio, for the set of blocks defined by this block. -
splitOneGo
-
simplify
public boolean simplify()
-