kivy-garden / garden.matplotlib

Matplotlib backends using kivy
MIT License
104 stars 50 forks source link

figure.facecolor is not respected by backend_kivyagg #36

Open janssen opened 8 years ago

janssen commented 8 years ago

Looks like another omission here. Facecolor is always white.

*** original/backend_kivyagg.py Thu Apr  7 11:26:32 2016
--- fixed/backend_kivyagg.py    Thu Apr  7 09:06:29 2016
***************
*** 196,202 ****
--- 196,205 ----
              buf_rgba = reg.to_string()
          texture = Texture.create(size=(w, h))
          texture.flip_vertical()
+         color = self.figure.get_facecolor()
          with self.canvas:
+             Color(*color)
+             Rectangle(pos=self.pos, size=(w, h))
              Color(1.0, 1.0, 1.0, 1.0)
              self.img_rect = Rectangle(texture=texture, pos=self.pos,
                                        size=(w, h))