draw line number
authoryu.dongliang <18588496441@163.com>
Thu, 13 Jul 2023 06:41:45 +0000 (14:41 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 13 Jul 2023 06:41:45 +0000 (14:41 +0800)
ses_layout.c

index cf08c91212b58eb2a94db98a80538303246ba223..f8aed0998454f97a6cc3b6c8061a45422654362d 100644 (file)
@@ -644,6 +644,15 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_
                                cairo_move_to(cr, l->x0, l->y0);
                                cairo_line_to(cr, l->x1, l->y1);
                        }
+
+                       uint8_t text[64];
+                       snprintf(text, sizeof(text) - 1, "%ld", el->id);
+
+                       cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+                       cairo_set_font_size   (cr, 20);
+                       cairo_move_to         (cr, l->x0 - 10, l->y0 + 5);
+                       cairo_show_text       (cr, text);
+
                        cairo_stroke(cr);
                }
        }