public interface IPackedColorPanel
Modifier and Type | Method and Description |
---|---|
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).
|
int |
cellHeight() |
int |
cellWidth() |
void |
clear(int x,
int y)
Removes the contents of this cell, leaving a transparent space.
|
com.badlogic.gdx.graphics.Color |
getDefaultForegroundColor() |
int |
gridHeight() |
int |
gridWidth() |
boolean |
hasActiveAnimations() |
void |
put(char[][] foregrounds,
com.badlogic.gdx.graphics.Color[][] colors) |
void |
put(int x,
int y,
char c)
Puts the character
c at (x, y) . |
void |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color)
Puts the character
c at (x, y) with some color . |
void |
put(int x,
int y,
char c,
float encodedColor)
Places a char in the given color at the given x,y position; if the implementation has a separate background from
the foreground characters, this will not affect it.
|
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 x,
int y,
float color)
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 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 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 |
setDefaultForeground(com.badlogic.gdx.graphics.Color color)
Sets the default foreground color.
|
void put(int x, int y, float color)
Color.toFloatBits()
.
If the implementation performs color filtering on Color objects, it generally won't on packed float colors.x
- x position of the celly
- y position of the cellcolor
- color for the full cell as a packed float, as made by Color.toFloatBits()
void blend(int x, int y, float color, float mixBy)
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)void put(int x, int y, char c, float encodedColor)
Color.toFloatBits()
. If the implementation performs color filtering on Color objects, it generally won't
on packed float colors.x
- x position of the chary
- y position of the charc
- the char to put at the given cellencodedColor
- the color for the char as a packed float, as made by Color.toFloatBits()
void put(int x, int y, char c)
c
at (x, y)
.x
- y
- c
- void put(int x, int y, com.badlogic.gdx.graphics.Color color)
color
at (x, y)
(in the cell's entirety, i.e. in the
background).x
- y
- color
- void put(int xOffset, int yOffset, java.lang.String string, com.badlogic.gdx.graphics.Color foreground)
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 charactersvoid put(int xOffset, int yOffset, squidpony.panel.IColoredString<? extends com.badlogic.gdx.graphics.Color> cs)
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.xOffset
- the x coordinate of the first characteryOffset
- the y coordinate of the first charactercs
- The string to display, with its colors.void put(int x, int y, char c, com.badlogic.gdx.graphics.Color color)
c
at (x, y)
with some color
.x
- y
- c
- color
- void put(char[][] foregrounds, com.badlogic.gdx.graphics.Color[][] colors)
foregrounds
- Can be null
, indicating that only colors must be put.colors
- void clear(int x, int y)
x
- y
- int gridWidth()
int gridHeight()
int cellWidth()
int cellHeight()
boolean hasActiveAnimations()
void setDefaultForeground(com.badlogic.gdx.graphics.Color color)
color
- com.badlogic.gdx.graphics.Color getDefaultForegroundColor()
setDefaultForeground(Color)
), or the last color set
with setDefaultForeground(Color)
. Cannot be
null
.Copyright © Eben Howard 2012–2022. All rights reserved.