public class DirtyItemList extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
DirtyItemList.DirtyItem
A class to hold the items inserted in the dirty list along with all of the information
necessary to render their dirty regions to the target graphics context when the time comes
to do so.
|
| Constructor and Description |
|---|
DirtyItemList()
Creates a dirt item list that will handle dirty items for the specified view.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendDirtyObject(SceneObject scobj)
Appends the dirty object tile at the given coordinates to the dirty item list.
|
void |
appendDirtySprite(Sprite sprite,
int tx,
int ty)
Appends the dirty sprite at the given coordinates to the dirty item list.
|
void |
clear()
Clears out any items that were in this list.
|
DirtyItemList.DirtyItem |
get(int idx)
Returns the dirty item at the given index in the list.
|
void |
paintAndClear(Graphics2D gfx)
Paints all the dirty items in this list using the supplied graphics context.
|
int |
size()
Returns the number of items in the dirty item list.
|
void |
sort()
Returns an array of the
DirtyItemList.DirtyItem objects in the list sorted in proper rendering
order. |
public DirtyItemList()
public void appendDirtySprite(Sprite sprite, int tx, int ty)
sprite - the dirty sprite itself.tx - the sprite's x tile position.ty - the sprite's y tile position.public void appendDirtyObject(SceneObject scobj)
scobj - the scene object that is dirty.public DirtyItemList.DirtyItem get(int idx)
public void sort()
DirtyItemList.DirtyItem objects in the list sorted in proper rendering
order.public void paintAndClear(Graphics2D gfx)
public void clear()
public int size()
Copyright © 2015. All rights reserved.