Jump to content

ForTest

Members
  • Content Count

    41
  • Joined

  • Last visited

About ForTest

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi This is a general question about graph interpolation that doesn't concern with the current features of uGFX (i hope these features will be added a day) Does anyone know some interpolation routine or library for graph that can be used in uGFX? I already know that uGFX connect points. I mean something like the figure. -Fabrizio-
  2. I'll give it a try Thank for suggestions
  3. I wrote my custom but it's very very slow void gwinButtonDraw_Rounded(GWidgetObject *gw, void *param) { const GColorSet * pcol; fixed alpha; fixed dalpha; coord_t i; color_t tcol, bcol; (void) param; if (gw->g.vmt != (gwinVMT *)&buttonVMT) return; pcol = getButtonColors(gw); /* Fill the box blended from variants of the fill color */ tcol = gdispBlendColor(White, pcol->fill, BTN_TOP_FADE); bcol = gdispBlendColor(Black, pcol->fill, BTN_BOTTOM_FADE); dalpha = FIXED(255)/gw->g.height; // Fade effect for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); // Round right side for (int z=0,k=BTN_CNR_SIZE;k!=0;k--,z++) gdispGDrawRoundedBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width+z, gw->g.height, BTN_CNR_SIZE, pcol->edge); // Round left side for (int z=0,k=BTN_CNR_SIZE;k!=0;k--,z++) gdispGDrawRoundedBox(gw->g.display, gw->g.x-z, gw->g.y, gw->g.width+z, gw->g.height, BTN_CNR_SIZE, pcol->edge); // Write text string in the center gdispGDrawStringBox(gw->g.display, gw->g.x+1, gw->g.y+BTN_CNR_SIZE, gw->g.width-2, gw->g.height-(2*BTN_CNR_SIZE), gw->text, gw->g.font, pcol->text, justifyCenter); } I will try with images but i don't think that it can be much faster than this
  4. The custom routine that redraw a push button with rounded border is the following: void gwinButtonDraw_Rounded(GWidgetObject *gw, void *param) { const GColorSet * pcol; (void) param; if (gw->g.vmt != (gwinVMT *)&buttonVMT) return; pcol = getButtonColors(gw); gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->pstyle->background); if (gw->g.width >= 2*BTN_CNR_SIZE+10) { gdispGFillRoundedBox(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width-2, gw->g.height-2, BTN_CNR_SIZE-1, pcol->fill); gdispGDrawStringBox(gw->g.display, gw->g.x+1, gw->g.y+BTN_CNR_SIZE, gw->g.width-2, gw->g.height-(2*BTN_CNR_SIZE), gw->text, gw->g.font, pcol->text, justifyCenter); gdispGDrawRoundedBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, BTN_CNR_SIZE, pcol->edge); } else { gdispGFillStringBox(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width-2, gw->g.height-2, gw->text, gw->g.font, pcol->text, pcol->fill, justifyCenter); gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, pcol->edge); } } This routine don't fill the box blended from variants of the fill color (differently from the normal routine) Anyone know if there is already a running implementation of "custom routine rounded with gradient color" ? Thanks
  5. My mistake. It works. In "Interactive mode" when i press the button it redraw the text label and don't redraw it correctly Just after the mouse is over the button it's redrawed again correctly
  6. Can't set the custom draw routine to " gwinButtonDraw_Rounded" I've seen it's possible to define new customs I hope it shouldn't be necessary to redefine manually all these: https://wiki.ugfx.io/index.php/PushButton
  7. Okay, we did not know We will try the command-line tool Thank you
  8. Image to array conversion function present in 0.15 was very important (like the font converter that is available online) Do you think to provide the same function online?
  9. We are certainly interested in the new beta But at the moment it's more important to have a working version of the Studio So how can we do it?
  10. Hi I get this error message from uGFX Studio I'm running version 0.15 so i think is the latest
  11. This is very impressive! What's the API name? Nice work. Is there a thread about it?
  12. ForTest

    Multi line label

    Hi Someone can advise me on what is the best method to display a multi line label in ugfx? I've seen on ugfx studio that containers seems to do something similar with texts but they haven't the possibility to make align, so before try some test of custom routine i would like to ask what is the best approach Thanks
  13. ForTest

    Graph axis size

    Ok, so this is the default graph style i use How should i change it for have for example a x/y axis line size of 3 pixel? // A graph styling static GGraphStyle GraphStyle1 = { { GGRAPH_POINT_DOT, 2, Red }, // Point { GGRAPH_LINE_SOLID, 1, Red }, // Line { GGRAPH_LINE_SOLID, 25, Black }, // X axis { GGRAPH_LINE_SOLID, 25, Black }, // Y axis { GGRAPH_LINE_DOT, 5, Gray, 50 }, // X grid { GGRAPH_LINE_DOT, 5, Gray, 50 }, // Y grid GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags }; By this way i get a x/y axis of 1 pixel
  14. ForTest

    Graph axis size

    Hi It's not clear for me if it's possible to change dynamically the size of the graph axis. The function gwinGraphDrawAxis seems to do that but i do not understand how should work Can anyone provide an example?
×
×
  • Create New...