-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
142 lines (141 loc) · 11.4 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<Page
x:Class="mandelbrot.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:mandelbrot"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="#FF402010" ManipulationMode="All" ManipulationDelta="Board_ManipulationDelta" SizeChanged="Grid_SizeChanged">
<Image x:Name="Board" Width="500" Height="500" Stretch="UniformToFill" PointerWheelChanged="Board_PointerWheelChanged" RenderTransformOrigin="0.5,0.5">
</Image>
<MenuBar VerticalAlignment="Top">
<MenuBarItem Title="Fractals :" >
<MenuBarItem.Background>
<SolidColorBrush Color="SlateGray" Opacity="0.5"/>
</MenuBarItem.Background>
<MenuFlyoutItem x:Name="MandelBrot" Text="MandelBrot" Click="MandelBrot_Click"/>
<MenuFlyoutItem x:Name="JuliaSet" Text="Julia" Click="JuliaSet_Click"/>
<MenuFlyoutItem x:Name="Multibrot" Text="Multibrot" Click="Multibrot_Click"/>
<MenuFlyoutItem x:Name="Multilia" Text="Multilia" Click="Multilia_Click"/>
<MenuFlyoutItem x:Name="DuckFractals" Text="DuckFractals" Click="DuckFractals_Click"/>
<MenuFlyoutItem x:Name="BurningShip" Text="BurningShip" Click="BurningShip_Click_1"/>
<MenuFlyoutItem x:Name="NewtonFrac" Text="NewtonFractal" Click="NewtonFrac_Click"/>
<MenuFlyoutItem x:Name="SymetricFrac" Visibility="Collapsed" Text="SymetricFractal" Click="NewtonFrac_Click"/>
<MenuFlyoutItem x:Name="WobblyFrac" Visibility="Collapsed" Text="WobblyFractal" Click="WobblyFrac_Click"/>
<MenuFlyoutItem x:Name="AtomicFrac" Visibility="Collapsed" Text="AtomicFractal" Click="AtomicFrac_Click"/>
<MenuFlyoutItem x:Name="CellularFrac" Visibility="Collapsed" Text="CellularFractal" Click="CellularFrac_Click"/>
<MenuFlyoutItem x:Name="CustomFractal" Visibility="Collapsed" Text="CustomFractal" Click="CustomFractal_Click"/>
</MenuBarItem>
</MenuBar>
<AppBar VerticalAlignment="Bottom">
<ScrollViewer x:Name="BottomBar" VerticalScrollBarVisibility="Hidden" HorizontalScrollMode="Enabled" HorizontalScrollBarVisibility="Visible" Width="700">
<StackPanel Orientation="Horizontal">
<AppBarElementContainer>
<ScrollViewer Height="200">
<StackPanel>
<TextBlock Text="Animate"/>
<GridView>
<AppBarButton x:Name="play" Label="Play" Icon="Play" Click="play_Click"/>
<AppBarButton x:Name="reset" Label="Reset" Icon="Undo" Click="reset_Click"/>
<AppBarButton x:Name="pause" Label="Pause" Icon="Pause" Click="pause_Click"/>
</GridView>
<ToggleSwitch x:Name="Animate" Margin="5,0,0,0" Header="Animation Mode:" OnContent="Zoom" OffContent="Randomize"/>
<GridView Margin="10,0,0,0">
<CheckBox x:Name="rndAlpha" IsChecked="True" Content="OnAlpha"/>
<CheckBox x:Name="rndBeta" IsChecked="False" Content="OnBeta"/>
</GridView>
</StackPanel>
</ScrollViewer>
</AppBarElementContainer>
<AppBarElementContainer>
<ScrollViewer Height="200">
<StackPanel Width="200">
<TextBlock Text="Presets"></TextBlock>
<StackPanel >
<Slider x:Name="MaxIter" Value="256" Margin="5,0,0,0" StepFrequency="8" TickFrequency="8" Header="maxIteration" Width="150" Minimum="16" Maximum="1024" ValueChanged="MaxIter_ValueChanged"></Slider>
<Slider x:Name="DivergenceLimit" Value="2" Margin="5,0,0,0" Header="DivergeanceOffset" Width="150" Minimum="0.01" Maximum="1000" TickFrequency="1" StepFrequency="0.01" ValueChanged="DivergenceLimit_ValueChanged"></Slider>
<Slider x:Name="alphaV" Value="0" Margin="5,0,0,0" Header="Z_init_X" Width="150" Minimum="-10" Maximum="10" TickFrequency="0.001" StepFrequency="0.001" ValueChanged="Alpha_ValueChanged"></Slider>
<Slider x:Name="betaV" Value="0" Margin="5,0,0,0" Header="Z_init_Y" Width="150" Minimum="-10" Maximum="10" TickFrequency="0.001" StepFrequency="0.001" ValueChanged="Beta_ValueChanged"></Slider>
<Slider x:Name="Nthpower" Value="5" Margin="5,0,0,0" Header="MultijuliaPower" Width="150" Minimum="2" Maximum="23" TickFrequency="1" StepFrequency="1" ValueChanged="Nthpower_ValueChanged"></Slider>
</StackPanel>
</StackPanel>
</ScrollViewer>
</AppBarElementContainer>
<AppBarElementContainer>
<ScrollViewer Height="200">
<StackPanel Width="300">
<TextBlock Text="Resolution"></TextBlock>
<CheckBox x:Name="ratio" Content="KeepRatio" Click="ratio_Click" IsChecked="True"/>
<Slider x:Name="Resolution" Value="2" Margin="5,0,0,0" Header="Resolution" Width="250" Minimum="500" Maximum="1270" TickFrequency="1" StepFrequency="1" ValueChanged="Resolution_ValueChanged_1"></Slider>
<GridView x:Name="XYContainer" Visibility="Collapsed">
<Slider x:Name="ResolutionX" Value="2" Margin="5,0,0,0" Header="Width" Width="125" Minimum="500" Maximum="1270" TickFrequency="1" StepFrequency="1" ValueChanged="ResolutionX_ValueChanged"></Slider>
<Slider x:Name="ResolutionY" Value="2" Margin="5,0,0,0" Header="Height" Width="125" Minimum="500" Maximum="1270" TickFrequency="1" StepFrequency="1" ValueChanged="ResolutionY_ValueChanged"></Slider>
</GridView>
</StackPanel>
</ScrollViewer>
</AppBarElementContainer>
<AppBarElementContainer>
<ScrollViewer Height="200">
<StackPanel Width="275" >
<TextBlock Text="Coloring"></TextBlock>
<GridView Header="Mode">
<RadioButton x:Name="HSLM" Content="FCP" IsChecked="False"></RadioButton>
<RadioButton x:Name="RGBM" Content="RGB" IsChecked="True"></RadioButton>
<RadioButton x:Name="NCPM" Content="NCP" IsChecked="False"></RadioButton>
</GridView>
<GridView Header="Colors">
<CheckBox x:Name="Red" Content="Red" IsChecked="True" ></CheckBox>
<CheckBox x:Name="Green" Content="Green" IsChecked="True"></CheckBox>
<CheckBox x:Name="Blue" Content="Blue" IsChecked="True"></CheckBox>
</GridView>
<Slider x:Name="alphaRgb" Header="Alpha From : fixed Value 255" Minimum="-1" Maximum="1" Value="0" StepFrequency="1" TickFrequency="1" ValueChanged="alphaRgb_ValueChanged"/>
<ToggleSwitch x:Name="smoother" OnContent="Smooth Coloring" OffContent="Discrete Coloring" IsOn="False" />
</StackPanel>
</ScrollViewer>
</AppBarElementContainer>
<AppBarElementContainer>
<ScrollViewer Height="200">
<StackPanel>
<TextBlock Text="Image Presets :"></TextBlock>
<GridView>
<Slider x:Name="ZoomSlider" Value="0" Margin="5,0,0,0" Header="Zoom" Width="150" Minimum="-50" Maximum="50" TickFrequency="1" StepFrequency="1" ValueChanged="Zoom_ValueChanged"></Slider>
<Slider x:Name="rotator" Value="0" Margin="5,0,0,0" Header="rotator" Width="150" Minimum="0" Maximum="359" TickFrequency="1" StepFrequency="1" ValueChanged="rotator_ValueChanged"/>
</GridView>
<GridView Width="250" Header="Rotations" Margin="10">
<AppBarButton x:Name="RotateLeft" Label="Rotate Left" Width="100" Click="RotateLeft_Click">
<AppBarButton.Icon>
<SymbolIcon Symbol="Orientation"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton x:Name="RotateRight" Label="Rotate Right" Width="100" Click="RotateRight_Click">
<AppBarButton.Icon >
<SymbolIcon Symbol="Orientation" RenderTransformOrigin="0.5,0.5">
<SymbolIcon.RenderTransform>
<CompositeTransform Rotation="0" ScaleY="1" ScaleX="-1"/>
</SymbolIcon.RenderTransform>
</SymbolIcon>
</AppBarButton.Icon>
</AppBarButton>
</GridView>
<GridView Width="250" Header="FlipFlaps" Margin="10">
<AppBarButton x:Name="FlipHorizontal" Label="Flip Horizontal" Width="100" Icon="Sort" Click="FlipHorizontal_Click"/>
<AppBarButton x:Name="FlipVertical" Label="Flip Horizontal" Width="100" Click="FlipVertical_Click">
<AppBarButton.Icon>
<SymbolIcon Symbol="Sort" RenderTransformOrigin="0.5,0.5">
<SymbolIcon.RenderTransform>
<CompositeTransform Rotation="90"/>
</SymbolIcon.RenderTransform>
</SymbolIcon>
</AppBarButton.Icon>
</AppBarButton>
</GridView>
</StackPanel>
</ScrollViewer>
</AppBarElementContainer>
</StackPanel>
</ScrollViewer>
</AppBar>
</Grid>
</Page>