flickering update
This commit is contained in:
parent
5db785d662
commit
d87d703596
@ -96,13 +96,15 @@ class StockTicker():
|
||||
img_width, img_height = image.size
|
||||
pixels = image.load()
|
||||
for y in range(max(0, -offset_y), min(img_height, self.matrix.height - offset_y)):
|
||||
for x in range(max(0,-offset_x), min(img_width, self.matrix.width - offset_x)):
|
||||
|
||||
|
||||
for x in range(max(0, -offset_x), min(img_width, self.matrix.width - offset_x)):
|
||||
#print(x,y)
|
||||
|
||||
(r, g, b) = pixels[x, y]
|
||||
|
||||
if min_x <= x + offset_x <= max_x and min_y <= y + offset_y <= max_y:
|
||||
(r, g, b) = pixels[x, y]
|
||||
self.matrix.SetPixel(x + offset_x, y + offset_y, r*self.brightness, g*self.brightness, b*self.brightness)
|
||||
|
||||
|
||||
def scrollImage(self, image, offset_x = 0, offset_y = 0):
|
||||
img_width, img_height = image.size
|
||||
|
||||
@ -1807,7 +1809,8 @@ if __name__ == '__main__':
|
||||
if kill:
|
||||
break
|
||||
'''
|
||||
#stock_ticker.process_msg(P')
|
||||
#
|
||||
#stock_ticker.process_msg('N')
|
||||
#stock_ticker.process_msg('G')
|
||||
#stock_ticker.process_msg('f')
|
||||
#stock_ticker.process_msg('A')
|
||||
|
Loading…
Reference in New Issue
Block a user