Class FlutterMutatorsStack.FlutterMutator
java.lang.Object
io.flutter.embedding.engine.mutatorsstack.FlutterMutatorsStack.FlutterMutator
- Enclosing class:
- FlutterMutatorsStack
A class represents a mutator
A mutator contains information of a single mutation operation that can be applied to a
PlatformView. See FlutterMutatorsStack.FlutterMutator for informations on Mutators.
-
Constructor Summary
ConstructorsConstructorDescriptionFlutterMutator(float opacity) Initialize an opacity mutator.FlutterMutator(Matrix matrix) Initialize a transform mutator.FlutterMutator(Path path) Initialize a clip path mutator.FlutterMutator(Rect rect) Initialize a clip rect mutator.FlutterMutator(Rect rect, float[] radiis) Initialize a clip rrect mutator. -
Method Summary
Modifier and TypeMethodDescriptionGet the matrix of the mutator if thegetType()returns FlutterMutatorType.TRANSFORM.floatGet the opacity of the mutator if thegetType()returns FlutterMutatorType.OPACITY.getPath()Get the path of the mutator if thegetType()returns FlutterMutatorType.CLIP_PATH.getRect()Get the rect of the mutator if thegetType()returns FlutterMutatorType.CLIP_RECT.getType()Get the mutator type.
-
Constructor Details
-
FlutterMutator
Initialize a clip rect mutator.- Parameters:
rect- the rect to be clipped.
-
FlutterMutator
Initialize a clip rrect mutator.- Parameters:
rect- the rect of the rrectradiis- the radiis of the rrect. Array of 8 values, 4 pairs of [X,Y]. This value cannot be null.
-
FlutterMutator
Initialize a clip path mutator.- Parameters:
path- the path to be clipped.
-
FlutterMutator
Initialize a transform mutator.- Parameters:
matrix- the transform matrix to apply.
-
FlutterMutator
public FlutterMutator(float opacity) Initialize an opacity mutator.- Parameters:
opacity- the opacity value to apply. The value must be between 0 and 1, inclusive.
-
-
Method Details
-
getType
Get the mutator type.- Returns:
- The type of the mutator.
-
getRect
Get the rect of the mutator if thegetType()returns FlutterMutatorType.CLIP_RECT.- Returns:
- the clipping rect if the type is FlutterMutatorType.CLIP_RECT; otherwise null.
-
getPath
Get the path of the mutator if thegetType()returns FlutterMutatorType.CLIP_PATH.- Returns:
- the clipping path if the type is FlutterMutatorType.CLIP_PATH; otherwise null.
-
getMatrix
Get the matrix of the mutator if thegetType()returns FlutterMutatorType.TRANSFORM.- Returns:
- the matrix if the type is FlutterMutatorType.TRANSFORM; otherwise null.
-
getOpacity
public float getOpacity()Get the opacity of the mutator if thegetType()returns FlutterMutatorType.OPACITY.- Returns:
- the opacity of the mutator if the type is FlutterMutatorType.OPACITY; otherwise 1.
-