Mercurial > hg > forks > multipaint-js
changeset 152:394c52d4763a
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 15 Aug 2018 15:54:47 +0300 |
parents | 8a9a9fcc02f7 |
children | 9f4e6f888120 |
files | Interface.pde |
diffstat | 1 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Interface.pde Wed Aug 15 13:57:50 2018 +0300 +++ b/Interface.pde Wed Aug 15 15:54:47 2018 +0300 @@ -224,13 +224,14 @@ } -void e_rect(int x1, int y1, int w, int h, int rgb) { +void e_rect(int x1, int y1, int w, int h, int rgb) +{ int ad = x1 + y1 * width; - //updatepixels has to be handled elsewhere - for (int yy = 0; yy < h; yy++) { - for (int xx = 0; xx < w; xx++) { + for (int yy = 0; yy < h; yy++) + { + for (int xx = 0; xx < w; xx++) pixels[ad + xx] = rgb; - } + ad += width; } } @@ -239,9 +240,10 @@ void d_rect(int x1, int y1, int w, int h, int rgb) { int ad = x1 + y1 * width; - //updatepixels has to be handled elsewhere - for (int yy = 0; yy < h; yy++) { - for (int xx = 0; xx < w; xx++) { + for (int yy = 0; yy < h; yy++) + { + for (int xx = 0; xx < w; xx++) + { if (xx == 0 || yy == 0 || xx == w - 1 || yy == h - 1) pixels[ad + xx] = rgb; } @@ -1241,6 +1243,7 @@ if (machine == PLUS4M || machine == PLUS4) { icontable(240 * g_uizoom, height - 32 * g_uizoom, 2, 1); } + colorselector(0, height - 32 * g_uizoom); colorindicator(256 * g_uizoom, height - 32 * g_uizoom); }