Line drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION), end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION), strokeWidth = EARTH_GROUND_STROKE_WIDTH ) // Dirt Line 1 drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION + 20), end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 20), strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, pathEffect = DashPathEffect(floatArrayOf(20f, 40f), 0f) ) // Dirt Line 2 drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION + 30), end = Offset(x = x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 30), strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, pathEffect = DashPathEffect(floatArrayOf(15f, 50f), 40f) ) } 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 // Ground Line drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION), end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION), strokeWidth = EARTH_GROUND_STROKE_WIDTH ) fun DrawScope.EarthView(earthState: EarthState) 1 { 2 3 4 5 6 7 8 9 10 // Dirt Line 1 11 drawLine( 12 color = Color.DarkGray, 13 start = Offset(x = 0f, y = EARTH_Y_POSITION + 20), 14 end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 20), 15 strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, 16 pathEffect = DashPathEffect(floatArrayOf(20f, 40f), 0f) 17 ) 18 19 // Dirt Line 2 20 drawLine( 21 color = Color.DarkGray, 22 start = Offset(x = 0f, y = EARTH_Y_POSITION + 30), 23 end = Offset(x = x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 30), 24 strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, 25 pathEffect = DashPathEffect(floatArrayOf(15f, 50f), 40f) 26 ) 27 } 28 // Dirt Line 1 drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION + 20), end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 20), strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, pathEffect = DashPathEffect(floatArrayOf(20f, 40f), 0f) ) fun DrawScope.EarthView(earthState: EarthState) 1 { 2 // Ground Line 3 drawLine( 4 color = Color.DarkGray, 5 start = Offset(x = 0f, y = EARTH_Y_POSITION), 6 end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION), 7 strokeWidth = EARTH_GROUND_STROKE_WIDTH 8 ) 9 10 11 12 13 14 15 16 17 18 19 // Dirt Line 2 20 drawLine( 21 color = Color.DarkGray, 22 start = Offset(x = 0f, y = EARTH_Y_POSITION + 30), 23 end = Offset(x = x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 30), 24 strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, 25 pathEffect = DashPathEffect(floatArrayOf(15f, 50f), 40f) 26 ) 27 } 28 // Dirt Line 2 drawLine( color = Color.DarkGray, start = Offset(x = 0f, y = EARTH_Y_POSITION + 30), end = Offset(x = x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 30), strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, pathEffect = DashPathEffect(floatArrayOf(15f, 50f), 40f) ) fun DrawScope.EarthView(earthState: EarthState) 1 { 2 // Ground Line 3 drawLine( 4 color = Color.DarkGray, 5 start = Offset(x = 0f, y = EARTH_Y_POSITION), 6 end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION), 7 strokeWidth = EARTH_GROUND_STROKE_WIDTH 8 ) 9 10 // Dirt Line 1 11 drawLine( 12 color = Color.DarkGray, 13 start = Offset(x = 0f, y = EARTH_Y_POSITION + 20), 14 end = Offset(x = deviceWidthInPixels.toFloat(), y = EARTH_Y_POSITION + 20), 15 strokeWidth = EARTH_GROUND_STROKE_WIDTH / 5, 16 pathEffect = DashPathEffect(floatArrayOf(20f, 40f), 0f) 17 ) 18 19 20 21 22 23 24 25 26 27 } 28 13