Advertisement
CapsAdmin

Untitled

Sep 10th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. for x = 0, width-1 do
  2.     for y = 0, height-1 do
  3.         local pos = (y * width + x) * stride
  4.  
  5.         colors = {callback(x, y, pos)}
  6.  
  7.         for i = 1, stride do
  8.             buffer[pos+i-1] = (colors[i] or 1) * 255
  9.         end
  10.     end
  11. end
  12.  
  13. ...............
  14.  
  15. local res = 16
  16. local _res = res/2
  17.    
  18. font:Fill(function(x, y, i)
  19.    
  20.     if i%res > _res then
  21.         return 1,1,1
  22.     else
  23.         return 0,0,0
  24.     end
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement