1. Ron Huang
  2. where-is-makkah

Commits

Ron Huang  committed eadecc9

Made arrow larger.

  • Participants
  • Parent commits 325209e
  • Branches default

Comments (0)

Files changed (2)

File WhereIsMakkah/MainPage.xaml

View file
 		</StackPanel>
 
 		<!--ContentPanel - place additional content here-->
-		<es:BlockArrow x:Name="DirectionArrow" Fill="{StaticResource PhoneAccentBrush}" Orientation="Up" UseLayoutRounding="False" Width="400" Grid.Row="1" Height="500" Visibility="{Binding DirectionDetermined, Converter={StaticResource BooleanToVisibilityConverter}}">
+		<es:BlockArrow x:Name="DirectionArrow" Fill="{StaticResource PhoneAccentBrush}" Orientation="Up" UseLayoutRounding="False" Width="450" Grid.Row="1" Height="550" Visibility="{Binding DirectionDetermined, Converter={StaticResource BooleanToVisibilityConverter}}">
 			<es:BlockArrow.Projection>
 				<Matrix3DProjection ProjectionMatrix="{Binding CurrentMatrix}"/>
 			</es:BlockArrow.Projection>

File WhereIsMakkah/ViewModel/MainViewModel.cs

View file
 
         private void CurrentValueChanged(MotionReading e)
         {
-            const double arrowWidth = 400.0;
-            const double arrowHeight = 500.0;
-            const double layoutWidth = 400.0;
-            const double layoutHeight = 500.0;
+            const double arrowWidth = 450.0;
+            const double arrowHeight = 550.0;
+            const double layoutWidth = 450.0;
+            const double layoutHeight = 550.0;
 
             // Translate the image along the negative Z-axis such that it occupies 50% of the
             // vertical field of view.
             double fovY = Math.PI / 2.0;
-            double translationZ = -arrowHeight / Math.Tan(fovY / 2.0);
+            double translationZ = -arrowHeight * 0.75;
 
             // You can create a 3D effect by creating a number of simple 
             // tranformation Matrix3D matrixes and then multiply them together.