Krzysztof Mossakowski
Windows Programming
2007 - Tasks
GDI+
Waves
Demonstration
Functionality:
new wave is created with double-click
wave properties
color: Blue
radius: from 0 to 256 pixels
transparency: from 0% to 100% (linear variation along the radius)
wave front width: from 0.2 to 0.0 of maximal radius (linear variation along the radius)
velocity: ~64 pixels / sec.
wave front properties
R - radius
r = 0.1 * (256 - R)
transparency in B point = R / 256 * 100%
transparency in points A and C = 0%
linear gradient from A to B and from B to C
unlimited waves number
flicker-free, optimized (fast) rendering - extreme inefficient implementations will be penalized
Hints:
PathGradientBrush, PathGradientBrush.CenterPoint, PathGradientBrush.InterpolationColors
ColorBlend, ColorBlend.Colors, ColorBlend.Positions
GraphicsPath
Color.FromArgb(), Color.Transparent
List<T>
Approximate points:
wave animation [2.5]
wave front mid-point transparency change [1.5]
transparency change inside the wave front [2.0]
wave front width change [1.5]
unlimited waves number [1.5]
rendering speed and quality [1.0]
Links for uploading:
Solutions
Corrections