Mercurial > hg > forks > multipaint-js
comparison Interface.pde @ 152:394c52d4763a
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 15 Aug 2018 15:54:47 +0300 |
parents | 8a9a9fcc02f7 |
children | 1b2cbf3ab441 |
comparison
equal
deleted
inserted
replaced
151:8a9a9fcc02f7 | 152:394c52d4763a |
---|---|
222 if (g_rband >= 3) return 0; | 222 if (g_rband >= 3) return 0; |
223 return 1; | 223 return 1; |
224 } | 224 } |
225 | 225 |
226 | 226 |
227 void e_rect(int x1, int y1, int w, int h, int rgb) { | 227 void e_rect(int x1, int y1, int w, int h, int rgb) |
228 { | |
228 int ad = x1 + y1 * width; | 229 int ad = x1 + y1 * width; |
229 //updatepixels has to be handled elsewhere | 230 for (int yy = 0; yy < h; yy++) |
230 for (int yy = 0; yy < h; yy++) { | 231 { |
231 for (int xx = 0; xx < w; xx++) { | 232 for (int xx = 0; xx < w; xx++) |
232 pixels[ad + xx] = rgb; | 233 pixels[ad + xx] = rgb; |
233 } | 234 |
234 ad += width; | 235 ad += width; |
235 } | 236 } |
236 } | 237 } |
237 | 238 |
238 | 239 |
239 void d_rect(int x1, int y1, int w, int h, int rgb) | 240 void d_rect(int x1, int y1, int w, int h, int rgb) |
240 { | 241 { |
241 int ad = x1 + y1 * width; | 242 int ad = x1 + y1 * width; |
242 //updatepixels has to be handled elsewhere | 243 for (int yy = 0; yy < h; yy++) |
243 for (int yy = 0; yy < h; yy++) { | 244 { |
244 for (int xx = 0; xx < w; xx++) { | 245 for (int xx = 0; xx < w; xx++) |
246 { | |
245 if (xx == 0 || yy == 0 || xx == w - 1 || yy == h - 1) | 247 if (xx == 0 || yy == 0 || xx == w - 1 || yy == h - 1) |
246 pixels[ad + xx] = rgb; | 248 pixels[ad + xx] = rgb; |
247 } | 249 } |
248 ad += width; | 250 ad += width; |
249 } | 251 } |
1239 icontable(272 * g_uizoom, height - 32 * g_uizoom, 1, 1); | 1241 icontable(272 * g_uizoom, height - 32 * g_uizoom, 1, 1); |
1240 palettebox(g_uizoom * 324 + 4, height - 32 * g_uizoom, width - (96 * g_uizoom) - 4); | 1242 palettebox(g_uizoom * 324 + 4, height - 32 * g_uizoom, width - (96 * g_uizoom) - 4); |
1241 if (machine == PLUS4M || machine == PLUS4) { | 1243 if (machine == PLUS4M || machine == PLUS4) { |
1242 icontable(240 * g_uizoom, height - 32 * g_uizoom, 2, 1); | 1244 icontable(240 * g_uizoom, height - 32 * g_uizoom, 2, 1); |
1243 } | 1245 } |
1246 | |
1244 colorselector(0, height - 32 * g_uizoom); | 1247 colorselector(0, height - 32 * g_uizoom); |
1245 colorindicator(256 * g_uizoom, height - 32 * g_uizoom); | 1248 colorindicator(256 * g_uizoom, height - 32 * g_uizoom); |
1246 } | 1249 } |
1247 | 1250 |
1248 | 1251 |