xref: /aosp_15_r20/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMatrix.java (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)
1 package org.robolectric.shadows;
2 
3 import android.graphics.Matrix;
4 import java.util.List;
5 import java.util.Map;
6 import org.robolectric.annotation.Implements;
7 import org.robolectric.shadows.ShadowMatrix.Picker;
8 
9 @SuppressWarnings({"UnusedDeclaration"})
10 @Implements(value = Matrix.class, shadowPicker = Picker.class)
11 public abstract class ShadowMatrix {
12   public static final String TRANSLATE = "translate";
13   public static final String SCALE = "scale";
14   public static final String ROTATE = "rotate";
15   public static final String SINCOS = "sincos";
16   public static final String SKEW = "skew";
17   public static final String MATRIX = "matrix";
18 
19   /**
20    * A list of all 'pre' operations performed on this Matrix. The last operation performed will be
21    * first in the list.
22    *
23    * @return A list of all 'pre' operations performed on this Matrix.
24    */
getPreOperations()25   public abstract List<String> getPreOperations();
26 
27   /**
28    * A list of all 'post' operations performed on this Matrix. The last operation performed will be
29    * last in the list.
30    *
31    * @return A list of all 'post' operations performed on this Matrix.
32    */
getPostOperations()33   public abstract List<String> getPostOperations();
34 
35   /**
36    * A map of all 'set' operations performed on this Matrix.
37    *
38    * @return A map of all 'set' operations performed on this Matrix.
39    */
getSetOperations()40   public abstract Map<String, String> getSetOperations();
41 
getDescription()42   public abstract String getDescription();
43 
44   /** Shadow picker for {@link Matrix}. */
45   public static final class Picker extends GraphicsShadowPicker<Object> {
Picker()46     public Picker() {
47       super(ShadowLegacyMatrix.class, ShadowNativeMatrix.class);
48     }
49   }
50 }
51