Giter Club home page Giter Club logo

marcmerlin / framebuffer_gfx Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 6.0 1.31 MB

Framebuffer::GFX is base Class for SmartMatrix::GFX, NeoMatrix::GFX, FastLED_SPITFT_GFX, FastLED_RPIRGBPanel_GFX, FastLED_TFTWrapper_GFX, and more

Home Page: http://marc.merlins.org/perso/arduino/post_2020-03-16_Framebuffer_GFX_-Choosing-between-its-3-2D-APIs_-FastLED-XY_-NeoMatrix_-and-LEDMatrix_-and-detail-of-its-many-supported-hardware-backends.html

License: GNU General Public License v3.0

C++ 90.33% C 9.67%

framebuffer_gfx's People

Contributors

jangxx avatar marcmerlin avatar paintyourdragon avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

framebuffer_gfx's Issues

left shift count >= width of type

In the Framebuffer_GFX.cpp line 152:

return (uint32_t)(c.r<<16) + (uint32_t)(c.g<<8) + (uint32_t)c.b;

you used incorrect cast to uint32_t

The expression

(uint32_t)(c.r<<16)

means that you make left shift FIRST, compute the result, using the type of the c.r variable and only after that (and perhaps after truncating the result to uint16 on AVR controllers) - casting it to uint32_t.

The correct syntax that prevent the truncation is:

((uint32_t)c.r<<16)

so you make casting FIRST and than shift the uint32_t value.

How to fill screen without `backgroundLayer.fillScreen()` ? Getting `Not Implemented in Framebuffer::GFX`.

Board: ESP32
Platform: PlatformIO

Using SmartMatrix. (or trying to use)

I have tried filling the screen with a color using:

#define LED_RED_HIGH 		  (31 << 11)
matrix->drawRect(0, 0, kMatrixWidth, kMatrixHeight, LED_RED_HIGH);
matrix->fillRect(0, 0, kMatrixWidth, kMatrixHeight, LED_RED_HIGH);
// or
matrix->fillScreen(LED_RED_HIGH);

and in both cases I get:

Not Implemented in Framebuffer::GFX

How are these not implemented ??? How do I fill the screen with a color without using backgroundLayer.fillScreen() ?

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.