ERIS CORE

◆ setPixel()

void AppWren::setPixel ( int16_t  x,
int16_t  y,
int16_t  r,
int16_t  g,
int16_t  b 
)
inline

set a pixel on the render target

Parameters
x
y
r
g
b

Definition at line 401 of file AppWren.h.

401  {
402  if (x < 0 || y < 0) return;
403  if (draw){
404  if (has_pop){
405  //draw->ILI9341_t3n::drawPixel(x,y,CL((uint16_t)r,(uint16_t)g,(uint16_t)b));
406  if(y > SCREEN_HEIGHT || x > SCREEN_WIDTH) return;
407  draw->getFrameBuffer()[(SCREEN_WIDTH * y)+x] = CL((uint16_t)r,(uint16_t)g,(uint16_t)b);
408  }else{
409  if (!surface_cache) return;
410  if (x >= surface_cache->getWidth()) return;
411  if (y >= surface_cache->getHeight()) return;
412  draw->drawPixel(surface_cache,x,y,CL(r,g,b));
413  }
414  }
415  }
ILI9341_t3_ERIS * draw
Definition: AppBaseClass.h:41
Surface * surface_cache
Definition: AppWren.h:770
void drawPixel(Surface *dest, int16_t x, int16_t y, uint16_t color)
uint16_t getHeight()
uint16_t getWidth()

References AppBaseClass::draw, ILI9341_t3_ERIS::drawPixel(), Surface::getHeight(), Surface::getWidth(), AppBaseClass::has_pop, surface_cache, AppBaseClass::x, and AppBaseClass::y.

+ Here is the call graph for this function: