laser_tunnel/Point.pde
lapin 732dd6fb5f first commit
ther is a base to draw line and covert to str format to the standar
output.
2020-10-06 22:55:32 +02:00

35 lines
479 B
Plaintext

public class Point
{
public int x;
public int y;
public int r;
public int g;
public int b;
public int col;
Point(int in_x, int in_y, int c)
{
x = in_x;
y = in_y;
r = (c >> 17) & 0xFF;
g = (c >> 8) & 0xFF;
b = (c >> 0) & 0xFF;
col = c;
}
Point(int in_x, int in_y, int col_r, int col_g, int col_b)
{
x = in_x;
y = in_y;
r = col_r & 0xFF;
g = col_g & 0xFF;
b = col_b & 0xFF;
col = (r & 0xFF) << 16| ((g & 0xFF) << 8) | ((b & 0xFF));
}
}