Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ; DrawRectangle3D not work
  2. proc DrawRectangle3D, _x:word, _y:word, _w:word, _h:word, _color1:dword, _color2:dword
  3.     mov ebx,dword[_w]
  4.     add ebx,dword[_x] ;âãâ â®ç­® ª ª ï-â® ¤¨çì... ­ã¦­® ¯¥à¥¯¨á âì :)
  5.     shl ebx,16
  6.     mov bx,1
  7.     mov ecx,dword[_h]
  8.     inc cx
  9.     mov edx,[_color2]
  10.     mcall SF_DRAW_RECT ; x+w,y,1,h+1,color2
  11.     rol ebx,16
  12.     sub bx,[_w]
  13.     ror ebx,16
  14.     dec cx
  15.     mov edx,[_color1]
  16.     mcall ;SF_DRAW_RECT x,y,1,h,color1
  17.     mov bx,[_h]
  18.     xchg bx,cx
  19.     mcall ;SF_DRAW_RECT x,y,w,1,color1
  20.     rol ecx,16
  21.     add cx,[_h]
  22.     ror ecx,16
  23.     mov edx,[_color2]
  24.     mcall ;SF_DRAW_RECT x,y+h,w,1,color2
  25.         ret
  26. endp
  27.  
  28.  
  29.  
  30. proc DrawDeepRectangle, _x:word, _y:word, _w:word, _h:word, color1:dword, color2:dword
  31. pusha
  32.  
  33. movzx ebx, [_x]
  34. shl ebx, 16
  35. or ebx, dword[_x]
  36. add ebx, dword[_w]
  37.  
  38. movzx ecx, [_y]
  39. shl ecx, 16
  40. add ecx, dword[_y]
  41.  
  42. mcall SF_DRAW_LINE, , ,[color1] ; x+w,y,1,h+1,color2
  43.  
  44. sub ebx, dword[_w]
  45. add ecx, dword[_h]
  46. int 0x40
  47.  
  48. mov edx, dword[_w]
  49. shl edx, 16
  50. or edx, dword[_w]
  51. add ebx, edx
  52. mcall SF_DRAW_LINE, , ,[color2]
  53.  
  54.  
  55.  
  56. mov edx, dword[_w]
  57. shl edx, 16
  58. sub ebx, edx
  59.  
  60. mov edx, dword[_h]
  61. shl edx, 16
  62. add ecx, edx
  63.  
  64. mcall SF_DRAW_LINE, , ,[color2]
  65.  
  66.  
  67. popa
  68.         ret
  69. endp