Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UsePNGImageDecoder()
  2. Global centercirclex = 10
  3. Global centercircley = 10
  4. Enumeration
  5. ;windows
  6.   #window
  7.  
  8. ;gadgets
  9.   #centercircle
  10.  
  11. ;images
  12.   #img_CenterCircle0
  13.   #img_CenterCircle1
  14.  
  15.  
  16.  
  17. EndEnumeration
  18.  
  19. Procedure Images()
  20.   LoadImage(#img_CenterCircle0,"images\centercircle\CenterCircle0.png")
  21. EndProcedure
  22. Images()
  23.  
  24. Procedure ImageRotate(lImg.l)
  25. lWidth.l = ImageWidth(lImg)-1;
  26. lHeight.l = ImageHeight(lImg)-1;
  27. Dim Image(ImageWidth(lImg),ImageHeight(lImg) );
  28. sImageLocation.s = "-1";
  29.  
  30. StartDrawing(ImageOutput(lImg)); Load the second image into memory
  31. For x = 0 To lWidth;
  32. For y = 0 To lHeight;
  33. Image(x,y) = Point(x,y);
  34. Next y;
  35. Next x;
  36. StopDrawing();
  37.  
  38. FreeImage(lImg);
  39. lImg = CreateImage(#PB_Any,lHeight+1,lWidth+1);
  40.  
  41. StartDrawing(ImageOutput(lImg)); Load the first image into memory
  42. For x = 0 To lWidth;
  43. For y = 0 To lHeight;
  44. Plot(lHeight-y,x,Image(x,y));
  45. Next y;
  46. Next x;
  47. StopDrawing();
  48. ProcedureReturn lImg;
  49. EndProcedure;
  50.  
  51. OpenWindow(#window,100,100,500,500,"",#PB_Window_BorderLess)
  52. SetWindowLong_(WindowID(#window),#GWL_EXSTYLE,GetWindowLong_(WindowID(#window),#GWL_EXSTYLE)|#WS_EX_LAYERED)
  53. SetLayeredWindowAttributes_(WindowID(#window),RGB(0,0,1),0,#LWA_COLORKEY)
  54. SetWindowColor(#window,RGB(0,0,1))
  55. StickyWindow(#window,1)
  56.  
  57. ;ImageGadget(#centercircle,10,10,200,200,ImageID(#img_CenterCircle0))
  58.  
  59. CreateImage(#PB_Any,ImageWidth(#img_CenterCircle0),ImageHeight(#img_CenterCircle0));
  60. StartDrawing(ImageOutput(#img_CenterCircle0))
  61.   DrawImage(ImageID(#img_centercircle0),10,10,ImageWidth(#img_CenterCircle0),ImageHeight(#img_CenterCircle0))
  62. StopDrawing()
  63.  
  64. MessageRequester("","")
  65.  
  66. ImageRotate(#img_CenterCircle0)
  67.  
  68. Time.s = FormatDate("%hh:%ii:%ss", Date())
  69.  
  70. Repeat
  71. event = WaitWindowEvent()
  72.  
  73.  
  74. Delay(10)
  75. Until  event = #PB_Event_CloseWindow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement