Jump to content

AJJ

Members
  • Content Count

    7
  • Joined

  • Last visited

About AJJ

  • Rank
    Newbie

Recent Profile Visitors

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

  1. I am finally updating uGFX from the version that I had downloaded 2 years ago. Per the previous comments I see that you added the following snippet of code to the fillarea(..) and vline_clip(..) functions just prior to calling gdisp_lld_fill_area(..): #if GDISP_HARDWARE_STREAM_POS && GDISP_HARDWARE_STREAM_WRITE if ((g->flags & GDISP_FLG_SCRSTREAM)) { gdisp_lld_write_stop(g); g->flags &= ~GDISP_FLG_SCRSTREAM; } #endif I think that this same piece of code also needs to be
  2. In the function hline_clip(..) in gdisp.c, the following code is executed when GDISP_HARDWARE_FILLS is defined: // This is an optimization for the point case. It is only worthwhile however if we // have hardware fills or if we support both hardware pixel drawing and hardware streaming #if GDISP_HARDWARE_FILLS || (GDISP_HARDWARE_DRAWPIXEL && GDISP_HARDWARE_STREAM_WRITE) // Is this a point if (g->p.x == g->p.x1) { drawpixel(g); return; } #endif // Best is hardware accelerated area fill #if GDISP_HARDWARE_F
  3. After some more looking at the code I think I understand that the GDISP_FLG_SCRSTREAM flag is meant to indicate that the bus is being held open and eventually autoflush(..) is supposed to release the bus. However, in my code I'm somehow getting into the drawpixel(..) function without owning the bus but the GDISP_FLG_SCRSTREAM is already set. So let me dig some more and I'll post an update once I've figured it out.
  4. In the drawpixel(..) function in gdisp.c starting at line 127 there is the following section: It seems to me that this code is missing calls to acquire and release the bus around the gdisp_lld_write_xxx(..) functions. The setglobalwindow(..) does call gdisp_lld_write_start(..), which acquires the bus, but setglobalwindow(..) is not always called. And of course there isn't anything to release the bus.
  5. Do you agree that because of this issue multi-line text is not vertically centered in a label? This has been my experience and the above change fixed it for me. But I'm new to uGFX and it's very possible that I'm doing something else wrong.
  6. Are you saying that font->height and font->line_height are the same thing? When I look at DejaVuSans16 for instance they are initialized to 17 and 19, respectively.
  7. Regarding the default situation where text is vertically centered within the label widget, I'm not sure that it works properly when displaying a string with multiple lines using a font where 'height' is different from 'line_height'. At line 3551 of gdisp.c the code calculates the total height as the number of lines times the font->height. Shouldn't this total height instead be something like the following? totalHeight = font->height + ((#lines-1) * font->line_height);
×
×
  • Create New...