static void Main(String[] args)
{
Actor actor;
Stage stage;
Canvas canvas;
Transition transition;
if (Application.Init() != InitError.Success)
{
return;
}
stage = new Stage();
stage.Title = "Rectangle with rounded corners";
stage.BackgroundColor = Clutter.Color.New(255, 255, 255, 255);
stage.SetSize(500, 500);
stage.Show();
canvas = (Canvas)Canvas.New();
canvas.SetSize(300, 300);
actor = new Actor();
actor.Content = canvas;
actor.ContentGravity = ContentGravity.Center;
actor.SetContentScalingFilters(ScalingFilter.Trilinear, ScalingFilter.Linear);
actor.SetPivotPoint(0.5f, 0.5f);
actor.AddConstraint(new BindConstraint(stage, BindCoordinate.Size, 0f));
stage.AddChild(actor);
transition = new PropertyTransition("rotation-angle-y");
transition.FromValue = new GLib.Value(0.0);
transition.ToValue = new GLib.Value(360.0);
((Timeline)transition).Duration = 2000;
((Timeline)transition).RepeatCount = -1;
actor.AddTransition("rotateActor", transition);
stage.Destroyed += (sender, e) => Application.MainQuit();
canvas.Drawn += DrawContent;
canvas.Invalidate();
Application.Main();
}