class PopUpCoachMarkPresenter {

    protected void setNotchDisplayEdge(int position,
                                     int anchorTopY,
                                     int anchorBottomY,
                                     int anchorTopX,
                                     CoachMarkPixelInfo coachMarkDimenInPixel) {
        int notchPosition;
        int actualTopMargin;
        int actualLeftMargin;
        int centerY = (anchorTopY + anchorBottomY) / 2;

        Rect notchMarginRect;
        Rect coachMarkMarginRect;
        Rect notchUiAdjustmentMarginRect;

        switch (position) {
            case PopUpPosition.LEFT:
                actualTopMargin = getActualTopMargin(centerY, coachMarkDimenInPixel);
                coachMarkMarginRect = new Rect(coachMarkDimenInPixel.getMarginRectInPixels().left,
                        actualTopMargin - coachMarkDimenInPixel.getMarginRectInPixels().bottom,
                        coachMarkDimenInPixel.getMarginRectInPixels().right +
                                coachMarkDimenInPixel.getImageWidthInPixels(),
                        NO_MARGIN);
                mPresentation.setPopUpViewTopLeft(coachMarkMarginRect,
                        CoachMarkLayoutOrientation.HORIZONTAL);
                notchPosition = getMarginTopForNotch(mCoachMarkBuilder.getNotchPosition(),
                        coachMarkDimenInPixel.getPopUpHeightInPixels(),
                        coachMarkDimenInPixel.getNotchDimenInPixels());
                notchMarginRect = new Rect(-coachMarkDimenInPixel.getMarginOffsetForNotchInPixels(),
                        notchPosition, NO_MARGIN, NO_MARGIN);
                mPresentation.setNotchPositionIfPopUpTopLeft(notchMarginRect, ROTATION_90);
                break;
            case PopUpPosition.TOP:
                actualLeftMargin = getActualLeftMargin(anchorTopX, coachMarkDimenInPixel);
                coachMarkMarginRect = new Rect(actualLeftMargin -
                        coachMarkDimenInPixel.getMarginRectInPixels().right,
                        coachMarkDimenInPixel.getMarginRectInPixels().top,
                        NO_MARGIN,
                        coachMarkDimenInPixel.getMarginRectInPixels().bottom +
                                coachMarkDimenInPixel.getImageHeightInPixels());
                mPresentation.setPopUpViewTopLeft(coachMarkMarginRect,
                        CoachMarkLayoutOrientation.VERTICAL);
                notchPosition = getMarginLeftForNotch(mCoachMarkBuilder.getNotchPosition(),
                        coachMarkDimenInPixel.getPopUpWidthInPixels(),
                        coachMarkDimenInPixel.getNotchDimenInPixels());
                notchMarginRect = new Rect(notchPosition +
                        coachMarkDimenInPixel.getMarginOffsetForNotchInPixels(),
                        -coachMarkDimenInPixel.getMarginOffsetForNotchInPixels(),
                        NO_MARGIN, NO_MARGIN);
                mPresentation.setNotchPositionIfPopUpTopLeft(notchMarginRect, ROTATION_180);
                break;
            case PopUpPosition.RIGHT:
                actualTopMargin = getActualTopMargin(centerY, coachMarkDimenInPixel);
                coachMarkMarginRect = new Rect(coachMarkDimenInPixel.getMarginRectInPixels().left +
                        coachMarkDimenInPixel.getImageWidthInPixels(),
                        actualTopMargin - coachMarkDimenInPixel.getMarginRectInPixels().bottom,
                        coachMarkDimenInPixel.getMarginRectInPixels().right,
                        NO_MARGIN);
                mPresentation.setPopUpViewBottomRight(coachMarkMarginRect,
                        CoachMarkLayoutOrientation.HORIZONTAL);
                notchPosition = getMarginTopForNotch(mCoachMarkBuilder.getNotchPosition(),
                        coachMarkDimenInPixel.getPopUpHeightInPixels(),
                        coachMarkDimenInPixel.getNotchDimenInPixels());
                notchMarginRect = new Rect(NO_MARGIN,
                        notchPosition - (int) (MULTIPLICATION_FACTOR_NOTCH_POSITION * coachMarkDimenInPixel.getMarginOffsetForNotchInPixels()),
                        NO_MARGIN,
                        NO_MARGIN);
                mPresentation.setNotchPositionIfPopUpBottomRight(notchMarginRect, ROTATION_270);
                notchUiAdjustmentMarginRect = new Rect(NO_MARGIN,
                        notchPosition + (int) (MULTIPLICATION_FACTOR_FOR_UI_ADJUSTMENT_RIGHT * coachMarkDimenInPixel.getMarginOffsetForNotchInPixels() + PIXEL_ADJUSTMENT_NOTCH),
                        NO_MARGIN,
                        NO_MARGIN);
                mPresentation.uiAdjustmentForNotchIfPopUpRight(notchUiAdjustmentMarginRect);
                break;
            case PopUpPosition.BOTTOM:
                actualLeftMargin = getActualLeftMargin(anchorTopX, coachMarkDimenInPixel);
                coachMarkMarginRect = new Rect(actualLeftMargin -
                        coachMarkDimenInPixel.getMarginRectInPixels().right,
                        coachMarkDimenInPixel.getMarginRectInPixels().top +
                                coachMarkDimenInPixel.getImageHeightInPixels(),
                        NO_MARGIN,
                        coachMarkDimenInPixel.getMarginRectInPixels().bottom);
                mPresentation.setPopUpViewBottomRight(coachMarkMarginRect,
                        CoachMarkLayoutOrientation.VERTICAL);
                notchPosition = getMarginLeftForNotch(mCoachMarkBuilder.getNotchPosition(),
                        coachMarkDimenInPixel.getPopUpWidthInPixels(),
                        coachMarkDimenInPixel.getNotchDimenInPixels());
                notchMarginRect = new Rect(notchPosition +
                        coachMarkDimenInPixel.getMarginOffsetForNotchInPixels(),
                        NO_MARGIN,
                        NO_MARGIN,
                        NO_MARGIN);
                mPresentation.setNotchPositionIfPopUpBottomRight(notchMarginRect, ROTATION_0);
                notchUiAdjustmentMarginRect = new Rect(notchPosition +
                        (int) (MULTIPLICATION_FACTOR_FOR_NOTCH_UI_ADJUSTMENT_BOTTOM *
                                coachMarkDimenInPixel.getMarginOffsetForNotchInPixels()),
                        NO_MARGIN,
                        NO_MARGIN,
                        NO_MARGIN);
                mPresentation.uiAdjustmentForNotchIfPopUpBottom(notchUiAdjustmentMarginRect);
                break;
        }
    }

    public  PopUpCoachMarkPresenter(final IStringResourceProvider stringResourceProvider,
                                   final IDimensionResourceProvider dimensionResourceProvider,
                                   final ITypeFaceProvider typeFaceProvider,
                                   final IScreenInfoProvider screenInfoProvider);

}