Menu

glcdbackground not for text

Help
2018-02-21
2018-02-21
  • stan cartwright

    stan cartwright - 2018-02-21

    Hi. If I use GLCDBackground = ili9341_blue and GLCDDrawString 140,154,str(pulse_out)+" ",ili9341_white or GLCDprint 140,154,str(pulse_out)+" ",ili9341_white on a filled blue circle, the backgroung is black.
    How do I make text backgroind blue?
    I used
    GLCDBackground = ili9341_blue
    GLCDCLS ILI9341_BLACK
    then filledcircle (xcentre,ycentre,79,ili9341_blue)
    then GLCDprint 140,154,str(pulse_out)+" ",ili9341_white. on the blue circle but text has black background.

     
    • Anobium

      Anobium - 2018-02-21

      Not enough information. Which font style is in use? OLED_FONTS or LEGACY fonts?

      And, simplfy your code to the absolute minimum then post the ASM as an attachment (a clue, you may have to post your text in the post, then, edit the post to add the attachment)

       

      Last edit: Anobium 2018-02-21
      • Anobium

        Anobium - 2018-02-21

        Looking at these posts again.

        GLCDCLS will set the background, so, you need to set the background after the this command. I will update the Help to reflect this.

        GLCDCLS ILI9341_BLACK
        GLCDBackground = ili9341_blue
        filledcircle (xcentre,ycentre,79,ili9341_blue)
        GLCDprint 140,154,str(pulse_out)+" ",ili9341_white)
        

        If this works, let me know, and, then you do not need to post the ASM of the optmised code.

         
  • stan cartwright

    stan cartwright - 2018-02-21

    Yes,moving glcdcls ili9341 black to before glcdbackground=ili9341_blue and the text background is now blue. thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.