Skip to content

Commit ec8b31e

Browse files
committed
code format and translations
1 parent c1e164e commit ec8b31e

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

locale/circuitpython.pot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,10 @@ msgstr ""
25662566
msgid "axis too long"
25672567
msgstr ""
25682568

2569+
#: shared-bindings/bitmaptools/__init__.c
2570+
msgid "background value out of range of target"
2571+
msgstr ""
2572+
25692573
#: py/builtinevex.c
25702574
msgid "bad compile mode"
25712575
msgstr ""
@@ -3917,6 +3921,7 @@ msgstr ""
39173921
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
39183922
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
39193923
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
3924+
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
39203925
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
39213926
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h
39223927
#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h
@@ -4358,6 +4363,10 @@ msgstr ""
43584363
msgid "value must fit in %d byte(s)"
43594364
msgstr ""
43604365

4366+
#: shared-bindings/bitmaptools/__init__.c
4367+
msgid "value out of range of target"
4368+
msgstr ""
4369+
43614370
#: shared-bindings/displayio/Bitmap.c
43624371
msgid "value_count must be > 0"
43634372
msgstr ""

shared-module/bitmaptools/__init__.c

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination,
263263
// first point is the one user passed in
264264
mp_obj_t point[] = { mp_obj_new_int(x), mp_obj_new_int(y) };
265265
mp_obj_list_append(
266-
fill_area,
267-
mp_obj_new_tuple(2, point)
268-
);
266+
fill_area,
267+
mp_obj_new_tuple(2, point)
268+
);
269269

270270
mp_obj_t *fill_points;
271271
size_t list_length = 0;
@@ -278,7 +278,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination,
278278
mp_obj_t *tuple_items;
279279

280280
// while there are still points to check
281-
while (list_length > 0){
281+
while (list_length > 0) {
282282
mp_obj_list_get(fill_area, &list_length, &fill_points);
283283
current_point = mp_obj_list_pop(fill_area, 0);
284284
mp_obj_tuple_get(current_point, &tuple_len, &tuple_items);
@@ -288,7 +288,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination,
288288
mp_obj_get_int(tuple_items[1]));
289289

290290
// if the current point is not background color ignore it
291-
if(current_point_color_value != background_value){
291+
if (current_point_color_value != background_value) {
292292
mp_obj_list_get(fill_area, &list_length, &fill_points);
293293
continue;
294294
}
@@ -303,28 +303,32 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination,
303303
// add all 4 surrounding points to the list to check
304304
mp_obj_t above_point[] = {
305305
tuple_items[0],
306-
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])-1)};
306+
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) - 1)
307+
};
307308
mp_obj_list_append(
308309
fill_area,
309310
mp_obj_new_tuple(2, above_point));
310311

311312
mp_obj_t left_point[] = {
312-
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])-1),
313-
tuple_items[1]};
313+
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) - 1),
314+
tuple_items[1]
315+
};
314316
mp_obj_list_append(
315317
fill_area,
316318
mp_obj_new_tuple(2, left_point));
317319

318320
mp_obj_t right_point[] = {
319-
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])+1),
320-
tuple_items[1]};
321+
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) + 1),
322+
tuple_items[1]
323+
};
321324
mp_obj_list_append(
322325
fill_area,
323326
mp_obj_new_tuple(2, right_point));
324327

325328
mp_obj_t below_point[] = {
326329
tuple_items[0],
327-
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])+1)};
330+
MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) + 1)
331+
};
328332
mp_obj_list_append(
329333
fill_area,
330334
mp_obj_new_tuple(2, below_point));

0 commit comments

Comments
 (0)