You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • drawing is done like this

      graphics.setColor(0,1,0);
      graphics.fillRect(70,70,120,100);
      graphics.setFontVector(12);
      graphics.drawString("Espruino",0,0);
    

    inside my module graphics are created like this:

                  me.graphics = Graphics.createCallback(240,320,16,{
                    setPixel:function(x,y,c){setPixel(x,y,c);},
                    fillRect:function(x1,y1,x2,y2,c){fillRect(x1,y1,x2,y2,c);}
                  });
    
    

    And fillRect is doing this:

      function fillRect(x1,y1,x2,y2,c){
    console.log(x1,y1,x2,y2,c);
    
    

    which returns this:
    70 70 120 120 undefined
    2 11 2 12 2016
    3 10 3 12 2016
    In my best understanding:
    drawing rects from drawString send color as 5th parameter
    same from fillRect does not use the color parameter

About

Avatar for JumJum @JumJum started