Skip to content

Commit

Permalink
Add focus point data to debug overlay
Browse files Browse the repository at this point in the history
Differential Revision: D57882313

fbshipit-source-id: 6420575a3d19099fc8ec4f8b56ab00ba5a091b74
  • Loading branch information
Brandon Baker (Consumption) authored and facebook-github-bot committed May 31, 2024
1 parent 8a0e8c7 commit a46bd86
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.facebook.fresco.vito.core.impl.debug;

import android.graphics.Color;
import android.graphics.PointF;
import android.graphics.Rect;
import com.facebook.common.internal.Supplier;
import com.facebook.fresco.ui.common.ControllerListener2;
Expand Down Expand Up @@ -85,6 +86,11 @@ private void setBasicData(DebugOverlayDrawable overlay, FrescoDrawableInterface
abstractDrawable.getActualImageWidthPx()
/ (float) abstractDrawable.getActualImageHeightPx()));
}
@Nullable PointF focusPoint = abstractDrawable.getActualImageFocusPoint();
if (focusPoint != null) {
overlay.addDebugData("FocusPointX", String.valueOf(focusPoint.x));
overlay.addDebugData("FocusPointY", String.valueOf(focusPoint.y));
}
}
}

Expand Down

0 comments on commit a46bd86

Please sign in to comment.