Skip to content

Commit

Permalink
Refactor png animation decoder
Browse files Browse the repository at this point in the history
Removes code duplication, simplifies memory operations.

Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Jan 31, 2024
1 parent f03efd7 commit 781267e
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 298 deletions.
6 changes: 3 additions & 3 deletions src/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ void canvas_draw_text(struct pixmap* wnd, enum info_position pos,
for (size_t i = 0; i < lines_num; ++i) {
const struct text_surface* key = &lines[i].key;
const struct text_surface* value = &lines[i].value;
size_t y;
size_t x_key;
size_t x_val;
size_t y = 0;
size_t x_key = 0;
size_t x_val = 0;

// calculate line position
switch (pos) {
Expand Down
Loading

0 comments on commit 781267e

Please sign in to comment.