Vibrating rectangles: Difference between revisions

No edit summary
Line 203:
{{libheader|SysUtils,StdCtrls}}
The program works by drawing a rectangle the size of the window and then shrinking it using the Windows InflateRect API call. Each time the rectangle shrinks, it steps through a 48 entry color palette. Each time the program goes through the color palette, it offsets the palette index by one, which causes the color pattern to move inward continously. By allowing the rectangle to shrink past zero, it turns inside out and give the exotic pattern seen in the image.
 
[[File:DelphiVibratingRectangles.png|frame|none]]
<syntaxhighlight lang="Delphi">
 
Line 241 ⟶ 243:
Elapsed Time: 14.692 Sec.
</pre>
 
 
=={{header|EasyLang}}==
465

edits