Advertisement
Guest User

z4trg.sdlbas

a guest
Jun 17th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /usr/bin/sdlbrt
  2. finp$="15_80.jpg"
  3. xsiz=80
  4. setdisplay(xsiz*11,xsiz*8,32,1):paper(8^8-1):ink(0):pen(0):cls
  5. loadimage(finp$,1):pasteicon(xsiz*9,0,1)
  6.  
  7. for y1=0 to xsiz-1 step 3
  8.   for x1=0 to xsiz-1 step 3
  9.     c0=point(xsiz*9+x1+1,y1+0)
  10.     c1=point(xsiz*9+x1+2,y1+1)
  11.     c2=point(xsiz*9+x1+1,y1+2)
  12.     c3=point(xsiz*9+x1+0,y1+1)
  13.     for con=0 to 11
  14.       ink(c0):line( (x1*8)+con       , (y1*8)+con       , ((x1+3)*8)-con-1 , (y1*8)+con       )
  15.       ink(c1):line( ((x1+3)*8)-con-1 , (y1*8)+con       , ((x1+3)*8)-con-1 , ((y1+3)*8)-con-1 )
  16.       ink(c2):line( ((x1+3)*8)-con-1 , ((y1+3)*8)-con-1 , (x1*8)+con       , ((y1+3)*8)-con-1 )
  17.       ink(c3):line( (x1*8)+con       , ((y1+3)*8)-con-1 , (x1*8)+con       , (y1*8)+con       )
  18.       next
  19.     next:next
  20.  
  21. grab(1,0,0,xsiz*8,xsiz*8):saveimage("_.bmp",1)
  22. shell("convert _.bmp "+finp$+"_.png && rm _.bmp")
  23. 'waitkey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement