copy/render part of an image

Posted on
  • Hi,

    I was looking for a way to render part of an image file.
    Idea is to draw a background image as watchface and restore only damaged sections when the clockhand moves.
    I've seen the mechanism that is used in imgclock but that one requires an intermediate file which works if the area is always the same, but is not very convenient for clockhands.

    Ideally I would like to have some rasterop/bitblt like functionality that could render from file or memory to screen., but I am not sure how easy it is to realise that (in an efficient way).
    Then again if the flash is memory mapped it should be feasible.

    Anyway: any suggestions on how to achieve selective redraws?

    Frans.

    PS: I understood from the ST7789VW datasheet that it actuall has an on-chip display data RAM of 240 x 320 x 18 bits. Not sure if our bangle uses the VW version, but if so would it make sense to make the off-screen data ram available? (I didn't go through all of the data sheet but maybe having data on the LCD controller chip could help to implement things in a more efficient way).

  • @FransM, Not sure if this will help you. But worth to check post #8.

    Also check it out this

  • I think I just answered this in http://forum.espruino.com/conversations/­342629/#comment15305975

    but... the g.drawImages in new firmwares is what you need I think: https://github.com/espruino/Espruino/blo­b/feb45fe7378010be74e8952e087d23950dac05­0f/libs/graphics/jswrap_graphics.c#L2234­

    It's easy to specify a big fullscreen image and then only draw part of it and also overlay another image on top of it.

    Then again if the flash is memory mapped it should be feasible.

    Sadly it's not - but because we're running an interpreter I try and just make it look memory mapped as far as possible :)

    it make sense to make the off-screen data ram available?

    There Bangle.setLCDMode("doublebuffered") which uses the 240x320 as double-buffered 240x160 - but there's not much else we can do AFAIK (you can't use the extra 2 bit per pixel for anything, and the way it's wired I can't see a way to read any data back from it).

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

copy/render part of an image

Posted by Avatar for FransM @FransM

Actions