write text

How i can write text on display through coding in s7g2 board ?

Parents Reply
  • Hi niku,

    Have you set the font before using gx_context_font_set? I have implemented the following window drawing function and I see "Hello" text on the screen:

    VOID main_window_draw(GX_WINDOW *widget)
    {
       SSP_PARAMETER_NOT_USED(widget);
       gx_context_brush_define(GX_COLOR_ID_SELECTED_TEXT, GX_COLOR_ID_SELECTED_TEXT,
                               GX_BRUSH_ALIAS | GX_BRUSH_SOLID_FILL);
       gx_context_brush_width_set(1);

       gx_context_font_set(GX_FONT_ID_PROMPT);
       gx_canvas_text_draw(10, 10, "Hello", 5);
    }

    Regards,
    adboc

Children