randomise the shape sizes, draw size and opacities
I currently use in Controller.cs:
private void MouseDraw(MainWindow main, Point p)
{
int RelativeToCenterOffsetX = (int)Math.Abs(p.X-(main.ActualWidth/2))/3;
int RelativeToCenterOffsetY = (int)Math.Abs(p.Y-(main.ActualHeight/2))/3;
//randomize at some point?
Shape shape = new Ellipse
{
Stroke = SystemColors.WindowTextBrush,
StrokeThickness = 0,
Fill = Utils.GetGradientBrush(Utils.GetRandomColor()),
Width = Utils.RandomBetweenTwoNumbers(RelativeToCenterOffsetX, (RelativeToCenterOffsetX+RelativeToCenterOffsetX/2)+10),
Height = Utils.RandomBetweenTwoNumbers(RelativeToCenterOffsetY, (RelativeToCenterOffsetY+RelativeToCenterOffsetY/2)+10)
};
Double RangedRandomOpacity = (Double)Utils.RandomBetweenTwoNumbers(1, 7) / 10;
shape.Fill.SetValue(SolidColorBrush.OpacityProperty, RangedRandomOpacity);
... rest of function elided
And In FigureGenerator.cs
I added
public static UserControl NewUserControlFrom(FigureTemplate template)
{
...
float f = (Utils.RandomBetweenTwoNumbers(10,20)/10);
group.Children.Add(new ScaleTransform(f,f));
... elided
They are both entertaining for baby and give a sense of depth and rotation. You may choose to handle the transform insertion better, I rather like it reverting to the orignal transform OnMouseOver.
:) my kids love it.