@@ -26,7 +26,7 @@ public partial class MapControl : ViewGroup, IMapControl
2626 /// <summary>
2727 /// The number of pixels per device independent unit
2828 /// </summary>
29- private float _density ;
29+ private float _pixelDensity ;
3030 /// <summary>
3131 /// Saver for center before last pinch movement
3232 /// </summary>
@@ -47,7 +47,7 @@ public MapControl(Context context, IAttributeSet attrs, int defStyle) :
4747 public void Initialize ( )
4848 {
4949 SetBackgroundColor ( Color . Transparent ) ;
50- _density = PixelsPerDeviceIndependentUnit ;
50+ _pixelDensity = PixelDensity ;
5151 _canvas = new SKCanvasView ( Context ) { IgnorePixelScaling = true } ;
5252 _canvas . PaintSurface += CanvasOnPaintSurface ;
5353 AddView ( _canvas ) ;
@@ -61,7 +61,7 @@ public void Initialize()
6161 _gestureDetector . DoubleTap += OnDoubleTapped ;
6262 }
6363
64- public float PixelsPerDeviceIndependentUnit => Resources . DisplayMetrics . Density ;
64+ public float PixelDensity => Resources . DisplayMetrics . Density ;
6565
6666 private void OnDoubleTapped ( object sender , GestureDetector . DoubleTapEventArgs e )
6767 {
@@ -226,7 +226,7 @@ private List<Point> GetScreenPositions(MotionEvent motionEvent, View view)
226226 for ( var i = 0 ; i < motionEvent . PointerCount ; i ++ )
227227 {
228228 result . Add ( new Point ( motionEvent . GetX ( i ) - view . Left , motionEvent . GetY ( i ) - view . Top )
229- . ToDeviceIndependentUnits ( PixelsPerDeviceIndependentUnit ) ) ;
229+ . ToDeviceIndependentUnits ( PixelDensity ) ) ;
230230 }
231231 return result ;
232232 }
@@ -240,7 +240,7 @@ private List<Point> GetScreenPositions(MotionEvent motionEvent, View view)
240240 private Point GetScreenPosition ( MotionEvent motionEvent , View view )
241241 {
242242 return GetScreenPositionInPixels ( motionEvent , view )
243- . ToDeviceIndependentUnits ( PixelsPerDeviceIndependentUnit ) ;
243+ . ToDeviceIndependentUnits ( PixelDensity ) ;
244244 }
245245
246246 /// <summary>
@@ -316,7 +316,7 @@ private void WidgetTouched(IWidget widget, Point screenPosition)
316316 /// <returns>The device pixels given as input translated to device pixels.</returns>
317317 private float ToDeviceIndependentUnits ( float pixelCoordinate )
318318 {
319- return pixelCoordinate / _density ;
319+ return pixelCoordinate / _pixelDensity ;
320320 }
321321
322322 public new void Dispose ( )
0 commit comments