From 70119ad6a3051ec3e00e3f7d37bf672ff1ee3a03 Mon Sep 17 00:00:00 2001 From: razerdp Date: Tue, 20 Dec 2016 12:45:05 +0800 Subject: [PATCH] // matrix --- .../razerdp/github/com/widget/PhotoContents.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java b/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java index 548ec35..4447875 100644 --- a/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java +++ b/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java @@ -1,6 +1,7 @@ package razerdp.github.com.widget; import android.content.Context; +import android.graphics.Matrix; import android.graphics.Rect; import android.support.annotation.NonNull; import android.util.AttributeSet; @@ -490,6 +491,20 @@ public List getContentViewsGlobalVisibleRects() { return viewRects; } + public List getContentViewsDrawableMatrixList(){ + final int childCount = getChildCount(); + if (childCount <= 0) return null; + List viewMatrixs = new LinkedList<>(); + for (int i = 0; i < childCount; i++) { + View v = getChildAt(i); + if (v instanceof ImageView&&((ImageView) v).getDrawable()!=null) { + Matrix matrix=((ImageView) v).getImageMatrix(); + viewMatrixs.add(matrix); + } + } + return viewMatrixs; + } + //------------------------------------------Interface----------------------------------------------- private OnSetUpChildLayoutParamsListener onSetUpChildLayoutParamsListener;