// Private Methods ///////////////////////////////////////////////////////// private void Init(Context context) { try { DisplayMetrics displayMetrics = context.Resources.DisplayMetrics; mHandleRadius = HandleUtil.getTargetRadius(context); mSnapRadius = TypedValue.ApplyDimension(ComplexUnitType.Dip, SNAP_RADIUS_DP, displayMetrics); mBorderPaint = PaintUtil.newBorderPaint(context); mGuidelinePaint = PaintUtil.newGuidelinePaint(); mBackgroundPaint = PaintUtil.newBackgroundPaint(context); mCornerPaint = PaintUtil.newCornerPaint(context); // Sets the values for the corner sizes mCornerOffset = TypedValue.ApplyDimension(ComplexUnitType.Dip, DEFAULT_CORNER_OFFSET_DP, displayMetrics); mCornerExtension = TypedValue.ApplyDimension(ComplexUnitType.Dip, DEFAULT_CORNER_EXTENSION_DP, displayMetrics); mCornerLength = TypedValue.ApplyDimension(ComplexUnitType.Dip, DEFAULT_CORNER_LENGTH_DP, displayMetrics); // Sets guidelines to default until specified otherwise mGuidelines = CropImageView.DEFAULT_GUIDELINES; } catch (Exception ex) { ex.ToString(); } }