summaryrefslogtreecommitdiff
path: root/apps/plugins/lua_scripts/rlimg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua_scripts/rlimg.lua')
-rwxr-xr-xapps/plugins/lua_scripts/rlimg.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/plugins/lua_scripts/rlimg.lua b/apps/plugins/lua_scripts/rlimg.lua
index c9dde65ed4..c4eefc7aa9 100755
--- a/apps/plugins/lua_scripts/rlimg.lua
+++ b/apps/plugins/lua_scripts/rlimg.lua
@@ -76,7 +76,7 @@ local BLUE = _clr.set(WHITE, 0, 0, 255)
76------------------------------------------- 76-------------------------------------------
77local clrs 77local clrs
78local CANCEL_BUTTON = rb.actions.PLA_CANCEL 78local CANCEL_BUTTON = rb.actions.PLA_CANCEL
79 79local LCD_DEPTH = rb.LCD_DEPTH
80-- EXAMPLES ---------------------------------------------------------------------- EXAMPLES--------------------------------------------------------------------- 80-- EXAMPLES ---------------------------------------------------------------------- EXAMPLES---------------------------------------------------------------------
81function my_blit(dst_val, dx, dy, src_val, sx, sy) 81function my_blit(dst_val, dx, dy, src_val, sx, sy)
82 -- user defined blit operation 82 -- user defined blit operation
@@ -84,7 +84,7 @@ function my_blit(dst_val, dx, dy, src_val, sx, sy)
84 --you may change pixels in both the source and dest image 84 --you may change pixels in both the source and dest image
85 --return nil to stop early 85 --return nil to stop early
86 86
87 if _lcd.DEPTH < 2 then 87 if LCD_DEPTH < 2 then
88 return src_val 88 return src_val
89 end 89 end
90 90
@@ -518,7 +518,7 @@ function twist(img)
518 for ix = 1, _lcd.W, w do 518 for ix = 1, _lcd.W, w do
519 y_col = y_col + 1 519 y_col = y_col + 1
520 y = ims.y_pos[(y_col % 2) + 1] 520 y = ims.y_pos[(y_col % 2) + 1]
521 if _lcd.DEPTH > 1 then 521 if LCD_DEPTH > 1 then
522 _lcd:copy(ims.strip, ix, 1, 1, y, w, h, false, _blit.BDEQC, colors[1]) 522 _lcd:copy(ims.strip, ix, 1, 1, y, w, h, false, _blit.BDEQC, colors[1])
523 else 523 else
524 _lcd:copy(ims.strip, ix, 1, 1, y, w, h, false, _blit.BSAND) 524 _lcd:copy(ims.strip, ix, 1, 1, y, w, h, false, _blit.BSAND)
@@ -767,10 +767,10 @@ function long_text()
767 local wait = 0 767 local wait = 0
768 w = w + wp * 3 768 w = w + wp * 3
769 h = h + 4 769 h = h + 4
770 local img = _img.new(w + 1, h) 770 local img = _img.new(w + 1, h + 1)
771 img:clear(BLACK) 771 img:clear(BLACK)
772 _draw.rounded_rect_filled(img, 1, 1, w, h, 15, WHITE) 772 _draw.rounded_rect_filled(img, 1, 1, w, h, 15, WHITE)
773 _draw_text(img, 1, 2, nil, nil, nil, BLACK, txt) 773 _draw_text(img, 1, 1, nil, nil, nil, BLACK, txt)
774 774
775 for p = -w + 1, w - 1 do 775 for p = -w + 1, w - 1 do
776 wait = 0 776 wait = 0
@@ -858,7 +858,7 @@ function main_menu()
858 [14] = function(EXIT_) return true end 858 [14] = function(EXIT_) return true end
859 } 859 }
860 860
861 if _lcd.DEPTH < 2 then 861 if LCD_DEPTH < 2 then
862 table.remove(mt, 10) 862 table.remove(mt, 10)
863 table.remove(ft, 10) 863 table.remove(ft, 10)
864 end 864 end
@@ -880,7 +880,7 @@ _timer("main") -- keep track of how long the program ran
880-- Clear the screen 880-- Clear the screen
881_lcd:clear(BLACK) 881_lcd:clear(BLACK)
882 882
883if _lcd.DEPTH > 1 then 883if LCD_DEPTH > 1 then
884--draw a gradient using available colors 884--draw a gradient using available colors
885if IS_COLOR_TARGET == true then 885if IS_COLOR_TARGET == true then
886 clrs = { 886 clrs = {