Last active
March 4, 2016 17:25
-
-
Save dupuyjs/4912cbd6dfa038210897 to your computer and use it in GitHub Desktop.
Visual Layer - Composition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Composition | |
SpriteVisual background = _compositor.CreateSpriteVisual(); | |
background.Size = new Vector2(300.0f, 300.0f); | |
background.Offset = new Vector3(50.0f, 50.0f, 0.0f); | |
CompositionColorBrush indigo = _compositor.CreateColorBrush(); | |
indigo.Color = Color.FromArgb(0xFF, 0x4B, 0x00, 0x82); | |
background.Brush = indigo; | |
root.Children.InsertAtTop(background); | |
SpriteVisual foreground = _compositor.CreateSpriteVisual(); | |
foreground.Size = new Vector2(300.0f, 300.0f); | |
foreground.Offset = new Vector3(150.0f, 150.0f, 0.0f); | |
CompositionColorBrush cyan = _compositor.CreateColorBrush(); | |
cyan.Color = Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF); | |
foreground.Brush = cyan; | |
foreground.Opacity = 0.8f; | |
root.Children.InsertAtTop(foreground); | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment