public class SquidPanel extends com.badlogic.gdx.scenes.scene2d.Group implements IPackedColorPanel
Modifier and Type | Field and Description |
---|---|
squidpony.squidmath.OrderedSet<AnimatedEntity> |
animatedEntities |
protected int |
animationCount |
squidpony.squidmath.OrderedSet<com.badlogic.gdx.scenes.scene2d.Actor> |
autoActors |
protected int |
cellHeight |
protected int |
cellWidth |
float[][] |
colors
The 2D array of floats representing colors in a way that libGDX can efficiently use, ABGR-packed.
|
char[][] |
contents
The 2D array of chars that this will render, using x,y indexing.
|
float |
DEFAULT_ANIMATION_DURATION |
protected com.badlogic.gdx.graphics.Color |
defaultForeground |
protected int |
gridHeight |
protected int |
gridOffsetX |
protected int |
gridOffsetY |
protected int |
gridWidth |
protected com.badlogic.gdx.graphics.Color |
lightingColor |
protected float |
lightingFloat |
boolean |
onlyRenderEven
For thin-wall maps, where only cells where x and y are both even numbers have backgrounds displayed.
|
protected squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> |
scc |
protected TextCellFactory |
textFactory |
protected com.badlogic.gdx.graphics.Color |
tmpColor |
protected float |
xOffset |
protected float |
yOffset |
Constructor and Description |
---|
SquidPanel(int gridWidth,
int gridHeight)
Creates a bare-bones panel with all default values for text rendering.
|
SquidPanel(int gridWidth,
int gridHeight,
int cellWidth,
int cellHeight)
Creates a panel with the given grid and cell size.
|
SquidPanel(int gridWidth,
int gridHeight,
TextCellFactory factory)
Builds a panel with the given grid size and all other parameters determined by the factory.
|
SquidPanel(int gridWidth,
int gridHeight,
TextCellFactory factory,
squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center)
Builds a panel with the given grid size and all other parameters determined by the factory.
|
SquidPanel(int gridWidth,
int gridHeight,
TextCellFactory factory,
squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center,
float xOffset,
float yOffset)
Builds a panel with the given grid size and all other parameters determined by the factory.
|
SquidPanel(int gridWidth,
int gridHeight,
TextCellFactory factory,
squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center,
float xOffset,
float yOffset,
char[][] actualMap)
Builds a panel with the given grid size and all other parameters determined by the factory.
|
Modifier and Type | Method and Description |
---|---|
float |
adjustX(float x,
boolean doubleWidth) |
float |
adjustY(float y) |
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
boolean stretch,
com.badlogic.gdx.graphics.g2d.TextureRegion texture)
Create an AnimatedEntity at position x, y, using a TextureRegion with no color modifications, which, if and only
if stretch is true, will be stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
boolean stretch,
com.badlogic.gdx.graphics.g2d.TextureRegion texture,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using a TextureRegion with the given color, which, if and only
if stretch is true, will be stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
char c,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using the char c in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
java.lang.String s,
java.util.Collection<com.badlogic.gdx.graphics.Color> colors)
Create an AnimatedEntity at position x, y, using the String s in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
java.lang.String s,
java.util.Collection<com.badlogic.gdx.graphics.Color> colors,
float loopTime)
Create an AnimatedEntity at position x, y, using the String s in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
java.lang.String s,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using the String s in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
com.badlogic.gdx.graphics.g2d.TextureRegion texture)
Create an AnimatedEntity at position x, y, using a TextureRegion with no color modifications, which will be
stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
com.badlogic.gdx.graphics.g2d.TextureRegion texture,
java.util.Collection<com.badlogic.gdx.graphics.Color> colors)
Create an AnimatedEntity at position x, y, using a TextureRegion with the given color, which will be
stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
com.badlogic.gdx.graphics.g2d.TextureRegion texture,
java.util.Collection<com.badlogic.gdx.graphics.Color> colors,
float loopTime)
Create an AnimatedEntity at position x, y, using a TextureRegion with the given color, which will be
stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
boolean doubleWidth,
com.badlogic.gdx.graphics.g2d.TextureRegion texture,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using a TextureRegion with the given color, which will be
stretched to fit one cell, or two cells if doubleWidth is true.
|
AnimatedEntity |
animateActor(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using the char c in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
java.lang.String s,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using the String s in the given color.
|
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion texture)
Create an AnimatedEntity at position x, y, using a TextureRegion with no color modifications, which will be
stretched to fit one cell.
|
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion texture,
com.badlogic.gdx.graphics.Color color)
Create an AnimatedEntity at position x, y, using a TextureRegion with the given color, which will be
stretched to fit one cell.
|
void |
blend(int x,
int y,
float color,
float mixBy)
Using the existing color at the position x,y, this performs color blending from that existing color to the given
color (as a float), using the mixBy parameter to determine how much of the color parameter to use (1f will set
the color in this to the parameter, while 0f for mixBy will ignore the color parameter entirely).
|
void |
bump(AnimatedEntity ae,
squidpony.squidgrid.Direction direction,
float duration)
Start a bumping animation in the given direction that will last duration seconds.
|
void |
bump(squidpony.squidmath.Coord location,
squidpony.squidgrid.Direction direction)
Starts a bumping animation in the direction provided.
|
void |
bump(int x,
int y,
squidpony.squidgrid.Direction direction)
Starts a bumping animation in the direction provided.
|
void |
bump(int x,
int y,
squidpony.squidgrid.Direction direction,
float duration)
Start a bumping animation in the given direction that will last duration seconds.
|
void |
burst(float delay,
int x,
int y,
int distance,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
boolean doubleWidth,
float rotationStrength,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
boolean doubleWidth,
float rotationStrength,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float rotationStrength,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
int distance,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
boolean doubleWidth,
float rotationStrength,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
void |
burst(int x,
int y,
int distance,
boolean eightWay,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float rotationStrength,
float duration)
Convenience method to produce an explosion, splash, or burst effect.
|
int |
cellHeight() |
TextCellFactory.Glyph |
cellToActor(int x,
int y)
Created an Actor from the contents of the given x,y position on the grid.
|
TextCellFactory.Glyph |
cellToActor(int x,
int y,
boolean doubleWidth)
Created an Actor from the contents of the given x,y position on the grid; deleting
the grid's String content at this cell.
|
int |
cellWidth() |
protected float |
clampDuration(float duration) |
void |
clear(int x,
int y)
Removes the contents of this cell, leaving a transparent space.
|
protected TextCellFactory.Glyph |
createActor(int x,
int y,
char name,
com.badlogic.gdx.graphics.Color color,
boolean doubleWidth) |
protected TextCellFactory.Glyph |
createActor(int x,
int y,
char name,
float encodedColor,
boolean doubleWidth) |
AnimatedEntity |
directionMarker(int x,
int y,
boolean doubleWidth,
java.util.Collection<com.badlogic.gdx.graphics.Color> colors,
float loopTime)
Create an AnimatedEntity at position x, y, using '^' as its contents, but as an image so it can be rotated.
|
AnimatedEntity |
directionMarker(int x,
int y,
boolean doubleWidth,
com.badlogic.gdx.graphics.Color color) |
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha)
Draws this SquidPanel and any
autoActors it has, and calls Actor.act(float) for each
AnimatedEntity this contains in animatedEntities or autoActors . |
void |
drawActor(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha,
com.badlogic.gdx.scenes.scene2d.Actor ac)
Draws one AnimatedEntity, specifically the Actor it contains.
|
void |
drawActor(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha,
AnimatedEntity ae)
Draws one AnimatedEntity, specifically the Actor it contains.
|
void |
erase()
Erases the entire panel, leaving only a transparent space.
|
void |
fade(int x,
int y,
com.badlogic.gdx.graphics.Color color,
float duration)
Fade the cell at
(x,y) to color . |
void |
fixPosition(AnimatedEntity ae) |
void |
fixPositions() |
squidpony.squidmath.OrderedSet<AnimatedEntity> |
getAnimatedEntities() |
AnimatedEntity |
getAnimatedEntityByCell(int x,
int y) |
char |
getAt(int x,
int y) |
com.badlogic.gdx.graphics.Color |
getColorAt(int x,
int y) |
squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> |
getColorCenter() |
com.badlogic.gdx.graphics.Color |
getDefaultForegroundColor() |
int |
getGridHeight()
The number of cells along the y-axis that will be rendered of this panel
|
int |
getGridOffsetX()
The X offset that the whole panel's internals will be rendered at.
|
int |
getGridOffsetY()
The Y offset that the whole panel's internals will be rendered at.
|
int |
getGridWidth()
The number of cells along the x-axis that will be rendered of this panel.
|
com.badlogic.gdx.graphics.Color |
getLightingColor() |
boolean |
getOnlyRenderEven()
Gets the status of a boolean flag used for rendering thin maps; it will almost always be false unless it
was set to true with
setOnlyRenderEven(boolean) . |
java.lang.StringBuilder |
getSnapshot()
Gets a "snapshot" of the data represented by this SquidPanel; stores the dimensions, the char data, and the color
data in a way that can be set back to a SquidPanel using
setFromSnapshot(String, int, int, int, int) or
its overload that takes a StringBuilder. |
java.lang.StringBuilder |
getSnapshot(int startX,
int startY,
int width,
int height)
Gets a "snapshot" of the data represented by this SquidPanel; stores the dimensions, the char data, and the color
data in a way that can be set back to a SquidPanel using
setFromSnapshot(String, int, int, int, int) or
its overload that takes a StringBuilder. |
TextCellFactory |
getTextCellFactory() |
int |
getTotalHeight()
Gets the total number of cells along the y-axis that this stores; this is usually equivalent to
getGridHeight() , but not if the constructor
SquidPanel(int, int, TextCellFactory, IColorCenter, float, float, char[][]) was used to set a
larger-than-normal map. |
int |
getTotalWidth()
Gets the total number of cells along the x-axis that this stores; this is usually equivalent to
getGridWidth() , but not if the constructor
SquidPanel(int, int, TextCellFactory, IColorCenter, float, float, char[][]) was used to set a
larger-than-normal map. |
float |
getxOffset() |
float |
getyOffset() |
int |
gridHeight() |
int |
gridWidth() |
boolean |
hasActiveAnimations() |
void |
put(char[][] chars)
Places the given characters into the grid starting at 0,0.
|
void |
put(char[][] chars,
com.badlogic.gdx.graphics.Color[][] foregrounds) |
void |
put(int x,
int y,
char c)
Puts the character
c at (x, y) . |
void |
put(int xOffset,
int yOffset,
char[][] chars) |
void |
put(int xOffset,
int yOffset,
char[][] chars,
com.badlogic.gdx.graphics.Color foreground) |
void |
put(int xOffset,
int yOffset,
char[][] chars,
com.badlogic.gdx.graphics.Color[][] foregrounds) |
void |
put(int xOffset,
int yOffset,
char[][] chars,
com.badlogic.gdx.graphics.Color foreground,
float colorMultiplier) |
void |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color)
Takes a unicode char for input.
|
void |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color,
float colorMultiplier)
Puts the given character at position x, y, with its color determined by the given color interpolated with
this SquidPanel's lightingColor (default is white light) by the amount specified by colorMultiplier (0.0
causes no change to the given color, 1.0 uses the lightingColor only, and anything between 0 and 1 will
produce some tint to color, and probably cache the produced color in the IColorCenter this uses).
|
void |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color,
float mixAmount,
com.badlogic.gdx.graphics.Color mix)
Puts the given character at position x, y, with its color determined by the given color interpolated with
the given mix color by the amount specified by mixAmount (0.0 causes no change to the given color, 1.0 uses mix
only, and anything between 0 and 1 will produce some tint to color, and probably cache the produced color in the
IColorCenter this uses).
|
void |
put(int x,
int y,
char c,
float encodedColor)
Takes a unicode char for input.
|
void |
put(int x,
int y,
char c,
float encodedColor,
float colorMultiplier)
Takes a unicode char for input and a color multiplier that determines how much of
lightingColor will
affect the given encodedColor. |
void |
put(int x,
int y,
char c,
float encodedColor,
float colorMultiplier,
float mixColor)
Intended for colored lighting; takes a unicode char for input and a color multiplier that determines how much of
mixColor will affect encodedColor.
|
void |
put(int x,
int y,
com.badlogic.gdx.graphics.Color color)
Puts
color at (x, y) (in the cell's entirety, i.e. |
void |
put(int xOffset,
int yOffset,
com.badlogic.gdx.graphics.Color[][] foregrounds) |
void |
put(int x,
int y,
com.badlogic.gdx.graphics.Color color,
float colorMultiplier) |
void |
put(int x,
int y,
com.badlogic.gdx.graphics.Color color,
float mixAmount,
com.badlogic.gdx.graphics.Color mix) |
void |
put(int x,
int y,
float encodedColor)
Places a full cell of color at the given x,y position; this may be used as a background or foreground, depending
on the implementation.
|
void |
put(int x,
int y,
float encodedColor,
float colorMultiplier) |
void |
put(int x,
int y,
float encodedColor,
float colorMultiplier,
float mixColor) |
void |
put(int xOffset,
int yOffset,
squidpony.panel.IColoredString<? extends com.badlogic.gdx.graphics.Color> cs)
Puts the given string horizontally with the first character at the given
offset, using the colors that
cs provides. |
void |
put(int x,
int y,
int code)
Takes a unicode codepoint for input.
|
void |
put(int x,
int y,
int c,
com.badlogic.gdx.graphics.Color color) |
void |
put(int xOffset,
int yOffset,
java.lang.String string)
Puts the given string horizontally with the first character at the given offset.
|
void |
put(int xOffset,
int yOffset,
java.lang.String string,
boolean vertical)
Puts the given string horizontally or optionally vertically, with the first character at the given offset.
|
void |
put(int xOffset,
int yOffset,
java.lang.String string,
com.badlogic.gdx.graphics.Color foreground)
Puts the given string horizontally with the first character at the given
offset.
|
void |
put(int xOffset,
int yOffset,
java.lang.String string,
com.badlogic.gdx.graphics.Color foreground,
boolean vertical)
Puts the given string horizontally or optionally vertically, with the first character at the given offset.
|
void |
put(int xOffset,
int yOffset,
java.lang.String string,
com.badlogic.gdx.graphics.Color foreground,
squidpony.squidgrid.Direction direction)
Puts the given string in the chosen direction, with the first character shown (not necessarily the first in the
string) at the given offset.
|
void |
put(int xOffset,
int yOffset,
java.lang.String string,
com.badlogic.gdx.graphics.Color foreground,
float colorMultiplier) |
void |
put(int xOffset,
int yOffset,
java.lang.String string,
float encodedColor) |
void |
put(int xOffset,
int yOffset,
java.lang.String string,
float encodedColor,
float colorMultiplier) |
void |
putBorders()
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in white.
|
void |
putBorders(com.badlogic.gdx.graphics.Color color)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
Color, which will be run through any IColorCenter this has for filtering.
|
void |
putBorders(com.badlogic.gdx.graphics.Color color,
java.lang.String caption)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
Color, which will be run through any IColorCenter this has for filtering.
|
void |
putBorders(float encodedColor)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
color as a packed float.
|
void |
putBorders(float encodedColor,
java.lang.String caption)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
color as a packed float.
|
void |
putBordersCaptioned(com.badlogic.gdx.graphics.Color color,
squidpony.panel.IColoredString<com.badlogic.gdx.graphics.Color> caption)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
libGDX Color.
|
void |
putBordersCaptioned(float encodedColor,
squidpony.panel.IColoredString<com.badlogic.gdx.graphics.Color> caption)
Changes the chars at the edge of the SquidPanel to be a border drawn with box drawing characters in the given
color as a packed float.
|
void |
recallActor(com.badlogic.gdx.scenes.scene2d.Actor a,
boolean restoreSym) |
void |
recallActor(com.badlogic.gdx.scenes.scene2d.Actor a,
boolean restoreSym,
int nextX,
int nextY) |
void |
recallActor(AnimatedEntity ae) |
void |
recallActor(AnimatedEntity ae,
int nextX,
int nextY) |
void |
recallActor(TextCellFactory.Glyph a,
boolean restoreSym,
int nextX,
int nextY) |
void |
removeAnimatedEntity(AnimatedEntity ae) |
void |
setColorCenter(squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> scc)
Use this method if you use your own
IColorCenter and want this
panel not to allocate its own colors (or fill
DefaultResources.getSCC() but instead to the provided center. |
void |
setDefaultForeground(com.badlogic.gdx.graphics.Color defaultForeground)
Sets the default foreground color.
|
SquidPanel |
setFromSnapshot(java.lang.String snapshot)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from 0,0 (inclusive) up to the dimensions stored in the snapshot to match the snapshot's data. |
SquidPanel |
setFromSnapshot(java.lang.StringBuilder snapshot)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from 0,0 (inclusive) up to the dimensions stored in the snapshot to match the snapshot's data. |
SquidPanel |
setFromSnapshot(java.lang.StringBuilder snapshot,
int putX,
int putY)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) up to the dimensions stored in the snapshot
(considering putX and putY as offsets) so they have the values stored in the snapshot. |
SquidPanel |
setFromSnapshot(java.lang.StringBuilder snapshot,
int putX,
int putY,
int limitWidth,
int limitHeight)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) to putX+limitWidth,putY+limitHeight (exclusive) so
they have the values stored in the snapshot. |
SquidPanel |
setFromSnapshot(java.lang.String snapshot,
int putX,
int putY)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) up to the dimensions stored in the snapshot
(considering putX and putY as offsets) so they have the values stored in the snapshot. |
SquidPanel |
setFromSnapshot(java.lang.String snapshot,
int putX,
int putY,
int limitWidth,
int limitHeight)
Given a "snapshot" from
getSnapshot(int, int, int, int) , this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) to putX+limitWidth,putY+limitHeight (exclusive) so
they have the values stored in the snapshot. |
void |
setGridHeight(int gridHeight)
Sets the number of cells along the y-axis that will be rendered of this panel to gridHeight.
|
void |
setGridOffsetX(int gridOffsetX)
Sets the X offset that the whole panel's internals will be rendered at.
|
void |
setGridOffsetY(int gridOffsetY)
Sets the Y offset that the whole panel's internals will be rendered at.
|
void |
setGridWidth(int gridWidth)
Sets the number of cells along the x-axis that will be rendered of this panel to gridWidth.
|
void |
setLightingColor(com.badlogic.gdx.graphics.Color lightingColor) |
void |
setOffsets(float x,
float y) |
void |
setOffsetX(float xOffset) |
void |
setOffsetY(float yOffset) |
void |
setOnlyRenderEven(boolean onlyRenderEven)
Sets the status of a boolean flag used for rendering thin maps; it should almost always be the default,
which is false, unless you are using a thin-wall map, and then this should be true only if this
SquidPanel is used for the background layer.
|
void |
setPosition(float x,
float y)
Sets the position of the actor's bottom left corner.
|
SquidPanel |
setTextSize(float wide,
float high)
Sets the size of the text in this SquidPanel (but not the size of the cells) to the given width and height in
pixels (which may be stretched by viewports later on, if your program uses them).
|
void |
slide(AnimatedEntity ae,
int newX,
int newY,
float duration)
Start a movement animation for the object at the grid location x, y and moves it to newX, newY over a number of
seconds given by duration (often 0.12f or somewhere around there).
|
void |
slide(squidpony.squidmath.Coord start,
squidpony.squidmath.Coord end)
Starts a movement animation for the object at the given grid location at the default speed.
|
void |
slide(squidpony.squidmath.Coord start,
squidpony.squidmath.Coord end,
float duration)
Starts a sliding movement animation for the object at the given location at the provided speed.
|
void |
slide(squidpony.squidmath.Coord start,
squidpony.squidgrid.Direction direction)
Starts a movement animation for the object at the given grid location at the default speed for one grid square in
the direction provided.
|
void |
slide(int x,
int y,
int newX,
int newY,
float duration)
Start a movement animation for the object at the grid location x, y and moves it to newX, newY over a number of
seconds given by duration (often 0.12f or somewhere around there).
|
void |
slide(int x,
int y,
java.lang.String name,
com.badlogic.gdx.graphics.Color color,
int newX,
int newY,
float duration)
Slides
name from (x,y) to (newx, newy) . |
void |
slide(int x,
int y,
java.lang.String name,
com.badlogic.gdx.graphics.Color color,
int newX,
int newY,
float duration,
java.lang.Runnable postRunnable)
Slides
name from (x,y) to (newx, newy) . |
void |
summon(float delay,
int startX,
int startY,
int endX,
int endY,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
boolean doubleWidth,
float startRotation,
float endRotation,
float duration)
Create a new Actor at (startX, startY) that looks like glyph but can rotate, and immediately starts changing
color from startColor to endColor, changing position so it ends on the cell (endX, endY), and changing rotation
from startRotation to endRotation, taking duration seconds to complete before removing the Actor.
|
void |
summon(int x,
int y,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float startRotation,
float endRotation,
float duration)
Create a new Actor at (x, y) that looks like glyph but can rotate, and immediately starts changing color from
startColor to endColor and changing rotation from startRotation to endRotation, taking duration seconds to
complete before removing the Actor.
|
void |
summon(int startX,
int startY,
int endX,
int endY,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
boolean doubleWidth,
float startRotation,
float endRotation,
float duration)
Create a new Actor at (startX, startY) that looks like glyph but can rotate, and immediately starts changing
color from startColor to endColor, changing position so it ends on the cell (endX, endY), and changing rotation
from startRotation to endRotation, taking duration seconds to complete before removing the Actor.
|
void |
summon(int startX,
int startY,
int endX,
int endY,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float rotation,
float duration)
Create a new Actor at (startX, startY) that looks like glyph but has the given rotation, and immediately starts
changing color from startColor to endColor, and changing position so it ends on the cell (endX, endY), taking
duration seconds to complete before removing the Actor.
|
void |
summon(int startX,
int startY,
int endX,
int endY,
char glyph,
com.badlogic.gdx.graphics.Color startColor,
com.badlogic.gdx.graphics.Color endColor,
float startRotation,
float endRotation,
float duration)
Create a new Actor at (startX, startY) that looks like glyph but can rotate, and immediately starts changing
color from startColor to endColor, changing position so it ends on the cell (endX, endY), and changing rotation
from startRotation to endRotation, taking duration seconds to complete before removing the Actor.
|
void |
summon(int startX,
int startY,
int endX,
int endY,
char glyph,
com.badlogic.gdx.graphics.Color color,
float startRotation,
float endRotation,
float duration)
Create a new Actor at (startX, startY) that looks like glyph but can rotate, sets its color, and immediately
starts changing position so it ends on the cell (endX, endY) and changing rotation from startRotation to
endRotation, taking duration seconds to complete before removing the Actor.
|
void |
tint(AnimatedEntity ae,
com.badlogic.gdx.graphics.Color color,
float duration)
Starts a tint animation for
ae for the given duration in seconds. |
void |
tint(float delay,
int x,
int y,
com.badlogic.gdx.graphics.Color color,
float duration)
Like
tint(int, int, Color, float) , but waits for delay
(in seconds) before performing it. |
void |
tint(float delay,
int x,
int y,
com.badlogic.gdx.graphics.Color color,
float duration,
java.lang.Runnable postRunnable)
Like
tint(int, int, Color, float) , but waits for delay
(in seconds) before performing it. |
void |
tint(int x,
int y,
com.badlogic.gdx.graphics.Color color,
float duration)
Starts a tint animation for the object at
(x,y) for the given
duration (in seconds). |
void |
wiggle(AnimatedEntity ae,
float duration)
Starts an wiggling animation for the object at the given location for the given duration in seconds.
|
void |
wiggle(int x,
int y,
float duration)
Starts an wiggling animation for the object at the given location for the given duration in seconds.
|
float |
worldX(int gridX,
boolean doubleWidth)
Used internally to go between grid positions and world positions.
|
float |
worldY(int gridY)
Used internally to go between grid positions and world positions.
|
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, childrenChanged, clear, clear, clearChildren, clearChildren, computeTransform, debugAll, drawChildren, drawDebug, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toString
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront
public float DEFAULT_ANIMATION_DURATION
protected int animationCount
protected com.badlogic.gdx.graphics.Color defaultForeground
protected squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> scc
protected int cellWidth
protected int cellHeight
protected int gridWidth
protected int gridHeight
protected int gridOffsetX
protected int gridOffsetY
public char[][] contents
'\0'
.public float[][] colors
SColor.lerpFloatColors(float, float, float)
if you expect to smoothly mix these float colors,
which avoids creating intermediate Color objects. There are more methods like that in SColor.protected com.badlogic.gdx.graphics.Color lightingColor
protected com.badlogic.gdx.graphics.Color tmpColor
protected TextCellFactory textFactory
protected float xOffset
protected float yOffset
protected float lightingFloat
public squidpony.squidmath.OrderedSet<AnimatedEntity> animatedEntities
public squidpony.squidmath.OrderedSet<com.badlogic.gdx.scenes.scene2d.Actor> autoActors
public boolean onlyRenderEven
setTextSize(float, float)
to double the previously-given cell width
and height.public SquidPanel(int gridWidth, int gridHeight)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallypublic SquidPanel(int gridWidth, int gridHeight, int cellWidth, int cellHeight)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallycellWidth
- the number of horizontal pixels in each cellcellHeight
- the number of vertical pixels in each cellpublic SquidPanel(int gridWidth, int gridHeight, TextCellFactory factory)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallyfactory
- the factory to use for cell renderingpublic SquidPanel(int gridWidth, int gridHeight, TextCellFactory factory, squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallyfactory
- the factory to use for cell renderingcenter
- the color center to use. Can be null
, which will use a defaultpublic SquidPanel(int gridWidth, int gridHeight, TextCellFactory factory, squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center, float xOffset, float yOffset)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallyfactory
- the factory to use for cell renderingcenter
- the color center to use. Can be null
, which will use a defaultxOffset
- the x offset to start rendering at, in pixels (or some other sub-cell measurement your game uses)yOffset
- the y offset to start rendering at, in pixels (or some other sub-cell measurement your game uses)public SquidPanel(int gridWidth, int gridHeight, TextCellFactory factory, squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> center, float xOffset, float yOffset, char[][] actualMap)
gridWidth
- the number of cells horizontallygridHeight
- the number of cells verticallyfactory
- the factory to use for cell renderingcenter
- the color center to use. Can be null
, which will use a defaultxOffset
- the x offset to start rendering at, in pixels (or some other sub-cell measurement your game uses)yOffset
- the y offset to start rendering at, in pixels (or some other sub-cell measurement your game uses)actualMap
- will often be a different size than gridWidth by gridHeight, which enables camera scrollingpublic void put(char[][] chars)
chars
- public void put(char[][] chars, com.badlogic.gdx.graphics.Color[][] foregrounds)
put
in interface IPackedColorPanel
chars
- Can be null
, indicating that only colors must be put.public void put(int xOffset, int yOffset, char[][] chars)
public void put(int xOffset, int yOffset, char[][] chars, com.badlogic.gdx.graphics.Color[][] foregrounds)
public void put(int xOffset, int yOffset, com.badlogic.gdx.graphics.Color[][] foregrounds)
public void put(int xOffset, int yOffset, char[][] chars, com.badlogic.gdx.graphics.Color foreground)
public void put(int xOffset, int yOffset, java.lang.String string)
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first characterstring
- the characters to be displayedpublic void put(int xOffset, int yOffset, squidpony.panel.IColoredString<? extends com.badlogic.gdx.graphics.Color> cs)
IPackedColorPanel
cs
provides.
Does not word wrap. Characters that are not renderable (due to being at
negative offsets or offsets greater than the grid size) will not be shown
but will not cause any malfunctions.put
in interface IPackedColorPanel
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first charactercs
- The string to display, with its colors.public void put(int xOffset, int yOffset, java.lang.String string, com.badlogic.gdx.graphics.Color foreground)
IPackedColorPanel
put
in interface IPackedColorPanel
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first characterstring
- the characters to be displayedforeground
- the color to draw the characterspublic void put(int xOffset, int yOffset, java.lang.String string, float encodedColor)
public void put(int xOffset, int yOffset, java.lang.String string, com.badlogic.gdx.graphics.Color foreground, float colorMultiplier)
public void put(int xOffset, int yOffset, java.lang.String string, float encodedColor, float colorMultiplier)
public void put(int xOffset, int yOffset, char[][] chars, com.badlogic.gdx.graphics.Color foreground, float colorMultiplier)
public void put(int xOffset, int yOffset, java.lang.String string, boolean vertical)
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first characterstring
- the characters to be displayedvertical
- true if the text should be written vertically, from top to bottompublic void put(int xOffset, int yOffset, java.lang.String string, com.badlogic.gdx.graphics.Color foreground, boolean vertical)
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first characterstring
- the characters to be displayedforeground
- the color to draw the charactersvertical
- true if the text should be written vertically, from top to bottompublic void put(int xOffset, int yOffset, java.lang.String string, com.badlogic.gdx.graphics.Color foreground, squidpony.squidgrid.Direction direction)
Direction.LEFT
, then this effectively reverses the String and
prints it with the last character of the String at the minimum-x position, which is the same position that the
first character would be if you printed normally or if you gave this RIGHT (x is xOffset, y is yOffset). Giving
UP acts similarly to LEFT, but has the last character at the minimum-y position and has the first character below
it. The diagonals act as you would expect, combining the behavior of one of UP or DOWN with one of LEFT or RIGHT.
xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first characterstring
- the characters to be displayedforeground
- the color to draw the charactersdirection
- the direction the text should be written in, such as Direction.RIGHT
for normal layoutpublic void putBorders()
public void putBorders(com.badlogic.gdx.graphics.Color color, java.lang.String caption)
color
- a libGDX Color to use for the borderscaption
- an optional caption that will be drawn at (1, 0). May be null.Another method that takes an IColoredString caption
public void putBorders(com.badlogic.gdx.graphics.Color color)
color
- a libGDX Color to use for the borderspublic void putBorders(float encodedColor)
encodedColor
- a packed float color to use for the borders, as from Color.toFloatBits()
public void putBorders(float encodedColor, java.lang.String caption)
encodedColor
- a packed float color to use for the borders, as from Color.toFloatBits()
caption
- an optional caption that will be drawn at (1, 0). May be null to have no caption.Another method that takes an IColoredString caption
public void putBordersCaptioned(com.badlogic.gdx.graphics.Color color, squidpony.panel.IColoredString<com.badlogic.gdx.graphics.Color> caption)
color
- a libGDX Color to use for the borderscaption
- an optional caption as an IColoredString that will be drawn at (1, 0). May be null to have no
caption. Will be colored independently from the border lines.public void putBordersCaptioned(float encodedColor, squidpony.panel.IColoredString<com.badlogic.gdx.graphics.Color> caption)
encodedColor
- a packed float color to use for the borders, as from Color.toFloatBits()
caption
- an optional caption as an IColoredString that will be drawn at (1, 0). May be null to have no
caption. Will be colored independently from the border lines.public void erase()
public void clear(int x, int y)
IPackedColorPanel
clear
in interface IPackedColorPanel
public void put(int x, int y, com.badlogic.gdx.graphics.Color color)
IPackedColorPanel
color
at (x, y)
(in the cell's entirety, i.e. in the
background).put
in interface IPackedColorPanel
public void put(int x, int y, float encodedColor)
IPackedColorPanel
Color.toFloatBits()
.
If the implementation performs color filtering on Color objects, it generally won't on packed float colors.put
in interface IPackedColorPanel
x
- x position of the celly
- y position of the cellencodedColor
- color for the full cell as a packed float, as made by Color.toFloatBits()
public void put(int x, int y, float encodedColor, float colorMultiplier)
public void put(int x, int y, float encodedColor, float colorMultiplier, float mixColor)
public void blend(int x, int y, float color, float mixBy)
IPackedColorPanel
blend
in interface IPackedColorPanel
x
- the x component of the position in this panel to draw the starting color fromy
- the y component of the position in this panel to draw the starting color fromcolor
- the new color to mix with the starting color; a packed float, as made by Color.toFloatBits()
mixBy
- the amount by which the new color will affect the old one, between 0 (no effect) and 1 (overwrite)public void put(int x, int y, com.badlogic.gdx.graphics.Color color, float colorMultiplier)
public void put(int x, int y, com.badlogic.gdx.graphics.Color color, float mixAmount, com.badlogic.gdx.graphics.Color mix)
public void put(int x, int y, char c)
IPackedColorPanel
c
at (x, y)
.put
in interface IPackedColorPanel
public void put(int x, int y, int code)
x
- y
- code
- public void put(int x, int y, int c, com.badlogic.gdx.graphics.Color color)
public void put(int x, int y, char c, com.badlogic.gdx.graphics.Color color)
put
in interface IPackedColorPanel
x
- y
- c
- color
- public void put(int x, int y, char c, float encodedColor)
put
in interface IPackedColorPanel
x
- y
- c
- encodedColor
- a float color as produced by SColor.floatGet(float, float, float, float)
public void put(int x, int y, char c, float encodedColor, float colorMultiplier)
lightingColor
will
affect the given encodedColor. The encodedColor is a float that might be produced by Color.toFloatBits()
or by mixing multiple such floats with SColor.lerpFloatColors(float, float, float)
.x
- y
- c
- encodedColor
- a float color as produced by SColor.floatGet(float, float, float, float)
colorMultiplier
- how much of lightingColor
to use in place of encodedColor, from 0.0 to 1.0public void put(int x, int y, char c, float encodedColor, float colorMultiplier, float mixColor)
Color.toFloatBits()
or by mixing multiple such floats with
SColor.lerpFloatColors(float, float, float)
; colorMultiplier is a normal float between 0.0f and 1.0f .x
- y
- c
- encodedColor
- a float color as produced by SColor.floatGet(float, float, float, float)
colorMultiplier
- how much of mixColor to use in place of encodedColor, from 0.0 to 1.0mixColor
- a color to mix with encodedColor, typically as part of colored lightingpublic void put(int x, int y, char c, com.badlogic.gdx.graphics.Color color, float colorMultiplier)
public void put(int x, int y, char c, com.badlogic.gdx.graphics.Color color, float mixAmount, com.badlogic.gdx.graphics.Color mix)
put(int, int, char, float, float, float)
, this will use the IColorCenter to produce the
finished color, which may be slightly slower if you don't need any of IColorCenter's features, and will use
more memory if many colors are cached, but has the advantage of being able to adjust colors with filters.public int cellWidth()
cellWidth
in interface IPackedColorPanel
public int cellHeight()
cellHeight
in interface IPackedColorPanel
public int gridHeight()
gridHeight
in interface IPackedColorPanel
public int gridWidth()
gridWidth
in interface IPackedColorPanel
public TextCellFactory getTextCellFactory()
TextCellFactory
backing this
.public SquidPanel setTextSize(float wide, float high)
wide
- the width of a glyph in pixelshigh
- the height of a glyph in pixelspublic void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
autoActors
it has, and calls Actor.act(float)
for each
AnimatedEntity this contains in animatedEntities
or autoActors
.
batch
if using a distance field or MSDF font and the shader is currently not
configured for such a font; it does not reset the shader to the default so that multiple Actors can all use the
same shader and so specific extra glyphs or other items can be rendered after calling draw(). If you need to draw
both a distance field font and full-color art, you should set the shader on the Batch to null when you want to
draw full-color art, and end the Batch between drawing this object and the other art.draw
in class com.badlogic.gdx.scenes.scene2d.Group
batch
- a Batch such as a FilterBatch
that must be between a begin() and end() call; usually done by StageparentAlpha
- only used when drawing children of this SquidPanelpublic void drawActor(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, AnimatedEntity ae)
batch
- Must have start() called already but not stop() yet during this frame.parentAlpha
- This can be assumed to be 1.0f if you don't know itae
- The AnimatedEntity to draw; the position to draw ae is stored inside it.public void drawActor(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, com.badlogic.gdx.scenes.scene2d.Actor ac)
batch
- Must have start() called already but not stop() yet during this frame.parentAlpha
- This can be assumed to be 1.0f if you don't know itac
- The Actor to draw; the position to draw ac is modified and reset based on some fields of this objectpublic void setDefaultForeground(com.badlogic.gdx.graphics.Color defaultForeground)
IPackedColorPanel
setDefaultForeground
in interface IPackedColorPanel
public com.badlogic.gdx.graphics.Color getDefaultForegroundColor()
getDefaultForegroundColor
in interface IPackedColorPanel
IPackedColorPanel.setDefaultForeground(Color)
), or the last color set
with IPackedColorPanel.setDefaultForeground(Color)
. Cannot be
null
.public AnimatedEntity getAnimatedEntityByCell(int x, int y)
public AnimatedEntity animateActor(int x, int y, char c, com.badlogic.gdx.graphics.Color color)
x
- y
- c
- color
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, char c, com.badlogic.gdx.graphics.Color color)
x
- y
- doubleWidth
- c
- color
- public AnimatedEntity animateActor(int x, int y, java.lang.String s, com.badlogic.gdx.graphics.Color color)
x
- y
- s
- color
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, java.lang.String s, com.badlogic.gdx.graphics.Color color)
x
- y
- doubleWidth
- s
- color
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, java.lang.String s, java.util.Collection<com.badlogic.gdx.graphics.Color> colors)
x
- y
- doubleWidth
- s
- colors
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, java.lang.String s, java.util.Collection<com.badlogic.gdx.graphics.Color> colors, float loopTime)
x
- y
- doubleWidth
- s
- colors
- loopTime
- public AnimatedEntity directionMarker(int x, int y, boolean doubleWidth, java.util.Collection<com.badlogic.gdx.graphics.Color> colors, float loopTime)
x
- y
- doubleWidth
- colors
- loopTime
- public AnimatedEntity directionMarker(int x, int y, boolean doubleWidth, com.badlogic.gdx.graphics.Color color)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion texture)
x
- y
- texture
- public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion texture, com.badlogic.gdx.graphics.Color color)
x
- y
- texture
- color
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, com.badlogic.gdx.graphics.g2d.TextureRegion texture)
x
- y
- doubleWidth
- texture
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, com.badlogic.gdx.graphics.g2d.TextureRegion texture, com.badlogic.gdx.graphics.Color color)
x
- y
- doubleWidth
- texture
- color
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, com.badlogic.gdx.graphics.g2d.TextureRegion texture, java.util.Collection<com.badlogic.gdx.graphics.Color> colors)
x
- y
- doubleWidth
- texture
- colors
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, com.badlogic.gdx.graphics.g2d.TextureRegion texture, java.util.Collection<com.badlogic.gdx.graphics.Color> colors, float loopTime)
x
- y
- doubleWidth
- texture
- colors
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, boolean stretch, com.badlogic.gdx.graphics.g2d.TextureRegion texture)
x
- y
- doubleWidth
- stretch
- texture
- public AnimatedEntity animateActor(int x, int y, boolean doubleWidth, boolean stretch, com.badlogic.gdx.graphics.g2d.TextureRegion texture, com.badlogic.gdx.graphics.Color color)
x
- y
- doubleWidth
- stretch
- texture
- color
- public TextCellFactory.Glyph cellToActor(int x, int y)
x
- y
- public TextCellFactory.Glyph cellToActor(int x, int y, boolean doubleWidth)
x
- y
- doubleWidth
- Actor
, that has just been added to this
.public float worldX(int gridX, boolean doubleWidth)
gridX
- x on the gridpublic float worldY(int gridY)
gridY
- y on the gridprotected TextCellFactory.Glyph createActor(int x, int y, char name, com.badlogic.gdx.graphics.Color color, boolean doubleWidth)
protected TextCellFactory.Glyph createActor(int x, int y, char name, float encodedColor, boolean doubleWidth)
public float adjustX(float x, boolean doubleWidth)
public float adjustY(float y)
public void recallActor(com.badlogic.gdx.scenes.scene2d.Actor a, boolean restoreSym)
public void recallActor(com.badlogic.gdx.scenes.scene2d.Actor a, boolean restoreSym, int nextX, int nextY)
public void recallActor(TextCellFactory.Glyph a, boolean restoreSym, int nextX, int nextY)
public void recallActor(AnimatedEntity ae)
public void recallActor(AnimatedEntity ae, int nextX, int nextY)
public void fixPosition(AnimatedEntity ae)
public void fixPositions()
public void bump(AnimatedEntity ae, squidpony.squidgrid.Direction direction, float duration)
ae
- an AnimatedEntity returned by animateActor()direction
- duration
- a float, measured in seconds, for how long the animation should last; commonly 0.12fpublic void bump(int x, int y, squidpony.squidgrid.Direction direction, float duration)
x
- y
- direction
- duration
- a float, measured in seconds, for how long the animation should last; commonly 0.12fpublic void bump(int x, int y, squidpony.squidgrid.Direction direction)
x
- y
- direction
- public void bump(squidpony.squidmath.Coord location, squidpony.squidgrid.Direction direction)
location
- direction
- public void slide(AnimatedEntity ae, int newX, int newY, float duration)
ae
- an AnimatedEntity returned by animateActor()newX
- newY
- duration
- public void slide(int x, int y, int newX, int newY, float duration)
x
- y
- newX
- newY
- duration
- public void slide(int x, int y, java.lang.String name, com.badlogic.gdx.graphics.Color color, int newX, int newY, float duration)
name
from (x,y)
to (newx, newy)
. If
name
or color
is null
, it is picked from this panel (hereby removing the
current name, if any).x
- Where to start the slide, horizontally.y
- Where to start the slide, vertically.name
- The name to slide, or null
to pick it from this
panel's (x,y)
cell.color
- The color to use, or null
to pick it from this panel's
(x,y)
cell.newX
- Where to end the slide, horizontally.newY
- Where to end the slide, vertically.duration
- The animation's duration.public void slide(int x, int y, java.lang.String name, com.badlogic.gdx.graphics.Color color, int newX, int newY, float duration, java.lang.Runnable postRunnable)
name
from (x,y)
to (newx, newy)
. If
name
or color
is null
, it is picked from this
panel (thereby removing the current name, if any). This also allows
a Runnable to be given as postRunnable
to be run after the
slide completes.x
- Where to start the slide, horizontally.y
- Where to start the slide, vertically.name
- The name to slide, or null
to pick it from this
panel's (x,y)
cell.color
- The color to use, or null
to pick it from this panel's
(x,y)
cell.newX
- Where to end the slide, horizontally.newY
- Where to end the slide, vertically.duration
- The animation's duration.postRunnable
- a Runnable to execute after the slide completes; may be null to do nothing.public void slide(squidpony.squidmath.Coord start, squidpony.squidmath.Coord end)
start
- Coord to pick up a tile from and slideend
- Coord to end the slide onpublic void slide(squidpony.squidmath.Coord start, squidpony.squidgrid.Direction direction)
start
- Coord to pick up a tile from and slidedirection
- Direction enum that indicates which way the slide should gopublic void slide(squidpony.squidmath.Coord start, squidpony.squidmath.Coord end, float duration)
start
- Coord to pick up a tile from and slideend
- Coord to end the slide onduration
- in seconds, as a floatpublic void wiggle(AnimatedEntity ae, float duration)
ae
- an AnimatedEntity returned by animateActor()duration
- in seconds, as a floatpublic void wiggle(int x, int y, float duration)
x
- y
- duration
- public void tint(AnimatedEntity ae, com.badlogic.gdx.graphics.Color color, float duration)
ae
for the given duration
in seconds.ae
- an AnimatedEntity returned by animateActor()color
- what to transition ae's color towards, and then transition back fromduration
- how long the total "round-trip" transition should take in secondspublic void tint(float delay, int x, int y, com.badlogic.gdx.graphics.Color color, float duration)
tint(int, int, Color, float)
, but waits for delay
(in seconds) before performing it.delay
- how long to wait in seconds before starting the effectx
- the x-coordinate of the cell to tinty
- the y-coordinate of the cell to tintcolor
- what to transition ae's color towards, and then transition back fromduration
- how long the total "round-trip" transition should take in secondspublic void tint(float delay, int x, int y, com.badlogic.gdx.graphics.Color color, float duration, java.lang.Runnable postRunnable)
tint(int, int, Color, float)
, but waits for delay
(in seconds) before performing it. Additionally, enqueue postRunnable
for running after the created action ends.delay
- how long to wait in seconds before starting the effectx
- the x-coordinate of the cell to tinty
- the y-coordinate of the cell to tintcolor
- what to transition ae's color towards, and then transition back fromduration
- how long the total "round-trip" transition should take in secondspostRunnable
- a Runnable to execute after the tint completes; may be null to do nothing.public void tint(int x, int y, com.badlogic.gdx.graphics.Color color, float duration)
(x,y)
for the given
duration
(in seconds).x
- the x-coordinate of the cell to tinty
- the y-coordinate of the cell to tintcolor
- duration
- public void fade(int x, int y, com.badlogic.gdx.graphics.Color color, float duration)
(x,y)
to color
. Contrary to
tint(int, int, Color, float)
, this action does not restore the
cell's color at the end of its execution. This is for example useful to
fade the game screen when the rogue dies.x
- the x-coordinate of the cell to tinty
- the y-coordinate of the cell to tintcolor
- The color at the end of the fadeout.duration
- The fadeout's duration.public void summon(int x, int y, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float startRotation, float endRotation, float duration)
x
- the x position in cells; doesn't changey
- the y position in cells; doesn't changeglyph
- the char to show (the same char throughout the effect, but it can rotate)startColor
- the starting ColorendColor
- the Color to transition tostartRotation
- the amount of rotation, in degrees, the glyph should start atendRotation
- the amount of rotation, in degrees, the glyph should end atduration
- the duration in seconds for the effectpublic void summon(int startX, int startY, int endX, int endY, char glyph, com.badlogic.gdx.graphics.Color color, float startRotation, float endRotation, float duration)
startX
- the starting x position in cellsstartY
- the starting y position in cellsendX
- the ending x position in cellsendY
- the ending y position in cellsglyph
- the char to show (the same char throughout the effect, but it can rotate)color
- the Color of the glyph throughout the effectstartRotation
- the amount of rotation, in degrees, the glyph should start atendRotation
- the amount of rotation, in degrees, the glyph should end atduration
- the duration in seconds for the effectpublic void summon(int startX, int startY, int endX, int endY, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float rotation, float duration)
startX
- the starting x position in cellsstartY
- the starting y position in cellsendX
- the ending x position in cellsendY
- the ending y position in cellsglyph
- the char to show (the same char throughout the effect, but it can rotate)startColor
- the starting ColorendColor
- the Color to transition torotation
- the amount of rotation, in degrees, the glyph should have throughout the effectduration
- the duration in seconds for the effectpublic void summon(int startX, int startY, int endX, int endY, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float startRotation, float endRotation, float duration)
startX
- the starting x position in cellsstartY
- the starting y position in cellsendX
- the ending x position in cellsendY
- the ending y position in cellsglyph
- the char to show (the same char throughout the effect, but it can rotate)startColor
- the starting ColorendColor
- the Color to transition tostartRotation
- the amount of rotation, in degrees, the glyph should start atendRotation
- the amount of rotation, in degrees, the glyph should end atduration
- the duration in seconds for the effectpublic void summon(int startX, int startY, int endX, int endY, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, boolean doubleWidth, float startRotation, float endRotation, float duration)
startX
- the starting x position in cellsstartY
- the starting y position in cellsendX
- the ending x position in cellsendY
- the ending y position in cellsglyph
- the char to show (the same char throughout the effect, but it can rotate)startColor
- the starting ColorendColor
- the Color to transition todoubleWidth
- true if this uses double-width cells, false in most casesstartRotation
- the amount of rotation, in degrees, the glyph should start atendRotation
- the amount of rotation, in degrees, the glyph should end atduration
- the duration in seconds for the effectpublic void summon(float delay, int startX, int startY, int endX, int endY, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, boolean doubleWidth, float startRotation, float endRotation, float duration)
delay
- amount of time, in seconds, to wait before starting the effectstartX
- the starting x position in cellsstartY
- the starting y position in cellsendX
- the ending x position in cellsendY
- the ending y position in cellsglyph
- the char to show (the same char throughout the effect, but it can rotate)startColor
- the starting ColorendColor
- the Color to transition todoubleWidth
- true if this uses double-width cells, false in most casesstartRotation
- the amount of rotation, in degrees, the glyph should start atendRotation
- the amount of rotation, in degrees, the glyph should end atduration
- the duration in seconds for the effectpublic void burst(int x, int y, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
This overload always moves Actors 1 cell away, which is a safe default, uses a "normal" amount of rotation for
for all of the actors (a value of 1f if you used another overload), and always uses an end color that is a
modified copy of startColor with 0 alpha (making the Actors all fade to transparent). The parameter
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions.x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors ateightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withduration
- how long, in seconds, the effect should lastpublic void burst(int x, int y, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
This overload always moves Actors 1 cell away, which is a safe default, and uses a "normal" amount of rotation
for all of the actors (a value of 1f if you used another overload). The parameter
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions.x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors ateightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect onduration
- how long, in seconds, the effect should lastpublic void burst(int x, int y, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float rotationStrength, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
This overload always moves Actors 1 cell away, which is a safe default. Some parameters need explanation:
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions;
rotationStrength can default to 1 if you want some rotation (which looks good) or 0 if you want the Actors to
start at the correct rotation and not change that rotation over the course of the effect, but can be between 0
and 1 or higher than 1 (negative values may also work).x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors ateightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect onrotationStrength
- how strongly to rotate the Actors; 0 is no rotation, 1 is a normal rotationduration
- how long, in seconds, the effect should lastpublic void burst(int x, int y, int distance, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, float rotationStrength, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
Some parameters need explanation: distance is how many cells away to move the created Actors away from (x,y);
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions;
rotationStrength can default to 1 if you want some rotation (which looks good) or 0 if you want the Actors to
start at the correct rotation and not change that rotation over the course of the effect, but can be between 0
and 1 or higher than 1 (negative values may also work).x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors atdistance
- how far away, in cells, to move each actor from the center (Chebyshev distance, forming a square)eightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect onrotationStrength
- how strongly to rotate the Actors; 0 is no rotation, 1 is a normal rotationduration
- how long, in seconds, the effect should lastpublic void burst(int x, int y, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, boolean doubleWidth, float rotationStrength, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
This overload always moves Actors 1 cell away, which is a safe default. Some parameters need explanation:
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions;
rotationStrength can default to 1 if you want some rotation (which looks good) or 0 if you want the Actors to
start at the correct rotation and not change that rotation over the course of the effect, but can be between 0
and 1 or higher than 1 (negative values may also work).x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors ateightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect ondoubleWidth
- true if this should use the double-width-cell technique, false in most casesrotationStrength
- how strongly to rotate the Actors; 0 is no rotation, 1 is a normal rotationduration
- how long, in seconds, the effect should lastpublic void burst(int x, int y, int distance, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, boolean doubleWidth, float rotationStrength, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
Some parameters need explanation: distance is how many cells away to move the created Actors away from (x,y);
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions;
rotationStrength can default to 1 if you want some rotation (which looks good) or 0 if you want the Actors to
start at the correct rotation and not change that rotation over the course of the effect, but can be between 0
and 1 or higher than 1 (negative values may also work).x
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors atdistance
- how far away, in cells, to move each actor from the center (Chebyshev distance, forming a square)eightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect ondoubleWidth
- true if this should use the double-width-cell technique, false in most casesrotationStrength
- how strongly to rotate the Actors; 0 is no rotation, 1 is a normal rotationduration
- how long, in seconds, the effect should lastpublic void burst(float delay, int x, int y, int distance, boolean eightWay, char glyph, com.badlogic.gdx.graphics.Color startColor, com.badlogic.gdx.graphics.Color endColor, boolean doubleWidth, float rotationStrength, float duration)
summon(float, int, int, int, int, char, Color, Color, boolean, float, float, float)
repeatedly with
different parameters. As with summon(), this creates temporary Actors that change color, position, and rotation.
Some parameters need explanation: distance is how many cells away to move the created Actors away from (x,y);
eightWay determines whether this produces 4 (cardinal) or 8 (cardinal and diagonal) rotations and directions;
rotationStrength can default to 1 if you want some rotation (which looks good) or 0 if you want the Actors to
start at the correct rotation and not change that rotation over the course of the effect, but can be between 0
and 1 or higher than 1 (negative values may also work).delay
- amount of time, in seconds, to wait before starting the effectx
- the starting, center, x-position to create all Actors aty
- the starting, center, y-position to create all Actors atdistance
- how far away, in cells, to move each actor from the center (Chebyshev distance, forming a square)eightWay
- if true, creates 8 Actors and moves them away in a square, otherwise, 4 Actors in a diamondglyph
- the char to make a rotate-able Actor of; should definitely be visiblestartColor
- the color to start the effect withendColor
- the color to end the effect ondoubleWidth
- true if this should use the double-width-cell technique, false in most casesrotationStrength
- how strongly to rotate the Actors; 0 is no rotation, 1 is a normal rotationduration
- how long, in seconds, the effect should lastpublic boolean hasActiveAnimations()
hasActiveAnimations
in interface IPackedColorPanel
public squidpony.squidmath.OrderedSet<AnimatedEntity> getAnimatedEntities()
public void removeAnimatedEntity(AnimatedEntity ae)
public squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> getColorCenter()
null
.public void setColorCenter(squidpony.IColorCenter<com.badlogic.gdx.graphics.Color> scc)
IColorCenter
and want this
panel not to allocate its own colors (or fill
DefaultResources.getSCC()
but instead to the provided center.scc
- The color center to use. Should not be null
.java.lang.NullPointerException
- If scc
is null
.public char getAt(int x, int y)
public com.badlogic.gdx.graphics.Color getColorAt(int x, int y)
public com.badlogic.gdx.graphics.Color getLightingColor()
public void setLightingColor(com.badlogic.gdx.graphics.Color lightingColor)
protected float clampDuration(float duration)
public int getGridOffsetX()
gridWidth
of this SquidPanel is
less than the actual size of the char[][] it renders, then you can use gridOffsetX to start rendering at a
different positionpublic void setGridOffsetX(int gridOffsetX)
gridOffsetX
- the requested offset in cellspublic int getGridOffsetY()
public void setGridOffsetY(int gridOffsetY)
gridOffsetY
- the requested offset in cellspublic int getGridWidth()
public void setGridWidth(int gridWidth)
gridWidth
- the requested width in cellspublic int getGridHeight()
public void setGridHeight(int gridHeight)
gridHeight
- the requested height in cellspublic int getTotalWidth()
getGridWidth()
, but not if the constructor
SquidPanel(int, int, TextCellFactory, IColorCenter, float, float, char[][])
was used to set a
larger-than-normal map.public int getTotalHeight()
getGridHeight()
, but not if the constructor
SquidPanel(int, int, TextCellFactory, IColorCenter, float, float, char[][])
was used to set a
larger-than-normal map.public void setPosition(float x, float y)
setPosition
in class com.badlogic.gdx.scenes.scene2d.Actor
x
- y
- public float getxOffset()
public void setOffsetX(float xOffset)
public float getyOffset()
public void setOffsetY(float yOffset)
public void setOffsets(float x, float y)
public boolean getOnlyRenderEven()
setOnlyRenderEven(boolean)
.
setTextSize(float, float)
to double the
previously-given cell width and height.public void setOnlyRenderEven(boolean onlyRenderEven)
setTextSize(float, float)
to double the
previously-given cell width and height.onlyRenderEven
- generally, should only be true if this SquidPanel is a background of a thin mappublic java.lang.StringBuilder getSnapshot()
setFromSnapshot(String, int, int, int, int)
or
its overload that takes a StringBuilder. The actual contents of the returned StringBuilder are unlikely to be
legible in any way if read as text, and are meant to be concise and stable across versions.setFromSnapshot(StringBuilder, int, int, int, int)
or converted to String and passed to its overloadpublic java.lang.StringBuilder getSnapshot(int startX, int startY, int width, int height)
setFromSnapshot(String, int, int, int, int)
or
its overload that takes a StringBuilder. The actual contents of the returned StringBuilder are unlikely to be
legible in any way if read as text, and are meant to be concise and stable across versions. This overload allows
the first x and y position used to be specified, as well as the width and height to use (the actual width and
height stored may be different if this SquidPanel's gridWidth and/or gridHeight are smaller than the width and/or
height given).startX
- the first x position to use in the snapshot, inclusivestartY
- the first y position to use in the snapshot, inclusivewidth
- how wide the snapshot area should be; x positions from startX to startX + width - 1 will be usedheight
- how tall the snapshot area should be; y positions from startY to startY + height - 1 will be usedsetFromSnapshot(StringBuilder, int, int, int, int)
or converted to String and passed to its overloadpublic SquidPanel setFromSnapshot(java.lang.StringBuilder snapshot)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from 0,0 (inclusive) up to the dimensions stored in the snapshot to match the snapshot's data.snapshot
- a StringBuilder in a special format as produced by getSnapshot(int, int, int, int)
public SquidPanel setFromSnapshot(java.lang.StringBuilder snapshot, int putX, int putY)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) up to the dimensions stored in the snapshot
(considering putX and putY as offsets) so they have the values stored in the snapshot.snapshot
- a StringBuilder in a special format as produced by getSnapshot(int, int, int, int)
putX
- where to start placing the data from the snapshot, x positionputY
- where to start placing the data from the snapshot, y positionpublic SquidPanel setFromSnapshot(java.lang.StringBuilder snapshot, int putX, int putY, int limitWidth, int limitHeight)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) to putX+limitWidth,putY+limitHeight (exclusive) so
they have the values stored in the snapshot. If limitWidth or limitHeight is negative, this uses the full width
and height of the snapshot (stopping early if it would extend past the gridWidth or gridHeight of this
SquidPanel).snapshot
- a StringBuilder in a special format as produced by getSnapshot(int, int, int, int)
putX
- where to start placing the data from the snapshot, x positionputY
- where to start placing the data from the snapshot, y positionlimitWidth
- if negative, uses all of snapshot's width as possible, otherwise restricts the width allowedlimitHeight
- if negative, uses all of snapshot's height as possible, otherwise restricts the height allowedpublic SquidPanel setFromSnapshot(java.lang.String snapshot)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from 0,0 (inclusive) up to the dimensions stored in the snapshot to match the snapshot's data.
snapshot
- a String in a special format as produced by getSnapshot(int, int, int, int)
public SquidPanel setFromSnapshot(java.lang.String snapshot, int putX, int putY)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) up to the dimensions stored in the snapshot
(considering putX and putY as offsets) so they have the values stored in the snapshot.
snapshot
- a String in a special format as produced by getSnapshot(int, int, int, int)
putX
- where to start placing the data from the snapshot, x positionputY
- where to start placing the data from the snapshot, y positionpublic SquidPanel setFromSnapshot(java.lang.String snapshot, int putX, int putY, int limitWidth, int limitHeight)
getSnapshot(int, int, int, int)
, this assigns the chars and colors in this
SquidPanel from the position given by putX,putY (inclusive) to putX+limitWidth,putY+limitHeight (exclusive) so
they have the values stored in the snapshot. If limitWidth or limitHeight is negative, this uses the full width
and height of the snapshot (stopping early if it would extend past the gridWidth or gridHeight of this
SquidPanel).
snapshot
- a String in a special format as produced by getSnapshot(int, int, int, int)
putX
- where to start placing the data from the snapshot, x positionputY
- where to start placing the data from the snapshot, y positionlimitWidth
- if negative, uses all of snapshot's width as possible, otherwise restricts the width allowedlimitHeight
- if negative, uses all of snapshot's height as possible, otherwise restricts the height allowedCopyright © Eben Howard 2012–2022. All rights reserved.