Giter Club home page Giter Club logo

Comments (6)

moononournation avatar moononournation commented on July 2, 2024

Yes, I know this behavior. The drawBitmap functions simply skip drawing if the drawing block not all inside the display area. The simplest workaround is change the height to 136:

Arduino_ST7789 *gfx = new Arduino_ST7789(bus, TFT_RST, 0 /* rotation */, true /* IPS */, 136 /* width */, 240 /* height */, 53 /* col offset 1 */, 40 /* row offset 1 */, 51 /* col offset 2 */, 40 /* row offset 2 */);

from arduino_gfx.

Eddddddddy avatar Eddddddddy commented on July 2, 2024

thanks for that.
By the way, is there a method that I could draw the block by 68x8? That is more efficiency, I guess.

from arduino_gfx.

moononournation avatar moononournation commented on July 2, 2024

I have committed some handling on incomplete drawing in jpegDrawCallback(), please pull latest version to take a look.

from arduino_gfx.

Eddddddddy avatar Eddddddddy commented on July 2, 2024

still not work.
I try to fix the error.
what I do:

static int jpegDrawCallback(JPEGDRAW *pDraw)
{
// Serial.printf("Draw pos = %d,%d. size = %d x %d\n", pDraw->x, pDraw->y, pDraw->iWidth, pDraw->iHeight);
  if (pDraw->x <= gfx->width())
  {
    int16_t w = pDraw->iWidth;    //that should be width, not height
    if ((pDraw->x + w) >= gfx->width())
    {
      w = gfx->width() - pDraw->x;
    }
    Serial.printf("Draw pos = %d,%d. size = %d x %d\n", pDraw->x, pDraw->y, w, pDraw->iHeight);
    gfx->draw16bitBeRGBBitmap(pDraw->x, pDraw->y, pDraw->pPixels, w, pDraw->iHeight);
    return 1;
  }
  return 1;   //if return 0, it will be stop drawing.
}

but the the pixels of last serval columns are dislocation. the image is not right.
IMG_3871

from arduino_gfx.

moononournation avatar moononournation commented on July 2, 2024

Should be fixed now, please pull latest code and take a look.

from arduino_gfx.

Eddddddddy avatar Eddddddddy commented on July 2, 2024

FANTASTIC JOB!
1.0.6 fixed the error.

thanks a lot.

from arduino_gfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.