Last active
March 13, 2024 03:22
-
-
Save tqk2811/358f0e0ff068bf846eb07e52ae7c4cc2 to your computer and use it in GitHub Desktop.
wpf Yuv Color Space
This file contains 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
<Window x:Class="Yuv.YuvColorSpaceWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
Title="YuvColorSpace" Height="470" Width="450"> | |
<Grid> | |
<Rectangle > | |
<Rectangle.Fill> | |
<VisualBrush TileMode="None"> | |
<VisualBrush.Visual> | |
<Canvas Width="1" Height="1" SnapsToDevicePixels="True"> | |
<Canvas.Background> | |
<LinearGradientBrush StartPoint="0,1" EndPoint="1,1"> | |
<LinearGradientBrush.GradientStops> | |
<GradientStop Color="#FFFF5000" Offset="0" /> | |
<GradientStop Color="#FFFF00FE" Offset="1" /> | |
</LinearGradientBrush.GradientStops> | |
</LinearGradientBrush> | |
</Canvas.Background> | |
<Rectangle Width="1" Height="1" SnapsToDevicePixels="True"> | |
<Rectangle.Fill> | |
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> | |
<LinearGradientBrush.GradientStops> | |
<GradientStop Color="#FF00FF00" Offset="0" /> | |
<GradientStop Color="#FF00AFFF" Offset="1" /> | |
</LinearGradientBrush.GradientStops> | |
</LinearGradientBrush> | |
</Rectangle.Fill> | |
<Rectangle.OpacityMask> | |
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> | |
<LinearGradientBrush.GradientStops> | |
<GradientStop Color="#FFFFFFFF" Offset="1"/> | |
<GradientStop Color="#00FFFFFF" Offset="0"/> | |
</LinearGradientBrush.GradientStops> | |
</LinearGradientBrush> | |
</Rectangle.OpacityMask> | |
</Rectangle> | |
</Canvas> | |
</VisualBrush.Visual> | |
</VisualBrush> | |
</Rectangle.Fill> | |
</Rectangle> | |
</Grid> | |
</Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment