mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-08-16 11:30:24 +08:00
Optionally disable clipping on the artboard.
This commit is contained in:
@ -85,6 +85,7 @@ import 'package:rive/src/generated/shapes/star_base.dart';
|
||||
import 'package:rive/src/generated/shapes/straight_vertex_base.dart';
|
||||
import 'package:rive/src/generated/shapes/triangle_base.dart';
|
||||
import 'package:rive/src/generated/transform_component_base.dart';
|
||||
import 'package:rive/src/generated/world_transform_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/animation.dart';
|
||||
import 'package:rive/src/rive_core/animation/animation_state.dart';
|
||||
import 'package:rive/src/rive_core/animation/any_state.dart';
|
||||
@ -691,6 +692,11 @@ class RiveCoreContext {
|
||||
object.fillRule = value;
|
||||
}
|
||||
break;
|
||||
case WorldTransformComponentBase.opacityPropertyKey:
|
||||
if (object is WorldTransformComponentBase && value is double) {
|
||||
object.opacity = value;
|
||||
}
|
||||
break;
|
||||
case TransformComponentBase.rotationPropertyKey:
|
||||
if (object is TransformComponentBase && value is double) {
|
||||
object.rotation = value;
|
||||
@ -706,11 +712,6 @@ class RiveCoreContext {
|
||||
object.scaleY = value;
|
||||
}
|
||||
break;
|
||||
case TransformComponentBase.opacityPropertyKey:
|
||||
if (object is TransformComponentBase && value is double) {
|
||||
object.opacity = value;
|
||||
}
|
||||
break;
|
||||
case NodeBase.xPropertyKey:
|
||||
if (object is NodeBase && value is double) {
|
||||
object.x = value;
|
||||
@ -911,6 +912,11 @@ class RiveCoreContext {
|
||||
object.drawTargetId = value;
|
||||
}
|
||||
break;
|
||||
case ArtboardBase.clipPropertyKey:
|
||||
if (object is ArtboardBase && value is bool) {
|
||||
object.clip = value;
|
||||
}
|
||||
break;
|
||||
case ArtboardBase.widthPropertyKey:
|
||||
if (object is ArtboardBase && value is double) {
|
||||
object.width = value;
|
||||
@ -1112,10 +1118,10 @@ class RiveCoreContext {
|
||||
case TrimPathBase.startPropertyKey:
|
||||
case TrimPathBase.endPropertyKey:
|
||||
case TrimPathBase.offsetPropertyKey:
|
||||
case WorldTransformComponentBase.opacityPropertyKey:
|
||||
case TransformComponentBase.rotationPropertyKey:
|
||||
case TransformComponentBase.scaleXPropertyKey:
|
||||
case TransformComponentBase.scaleYPropertyKey:
|
||||
case TransformComponentBase.opacityPropertyKey:
|
||||
case NodeBase.xPropertyKey:
|
||||
case NodeBase.yPropertyKey:
|
||||
case PathVertexBase.xPropertyKey:
|
||||
@ -1178,6 +1184,7 @@ class RiveCoreContext {
|
||||
case PointsPathBase.isClosedPropertyKey:
|
||||
case RectangleBase.linkCornerRadiusPropertyKey:
|
||||
case ClippingShapeBase.isVisiblePropertyKey:
|
||||
case ArtboardBase.clipPropertyKey:
|
||||
return boolType;
|
||||
case KeyFrameColorBase.valuePropertyKey:
|
||||
case SolidColorBase.colorValuePropertyKey:
|
||||
@ -1360,14 +1367,14 @@ class RiveCoreContext {
|
||||
return (object as TrimPathBase).end;
|
||||
case TrimPathBase.offsetPropertyKey:
|
||||
return (object as TrimPathBase).offset;
|
||||
case WorldTransformComponentBase.opacityPropertyKey:
|
||||
return (object as WorldTransformComponentBase).opacity;
|
||||
case TransformComponentBase.rotationPropertyKey:
|
||||
return (object as TransformComponentBase).rotation;
|
||||
case TransformComponentBase.scaleXPropertyKey:
|
||||
return (object as TransformComponentBase).scaleX;
|
||||
case TransformComponentBase.scaleYPropertyKey:
|
||||
return (object as TransformComponentBase).scaleY;
|
||||
case TransformComponentBase.opacityPropertyKey:
|
||||
return (object as TransformComponentBase).opacity;
|
||||
case NodeBase.xPropertyKey:
|
||||
return (object as NodeBase).x;
|
||||
case NodeBase.yPropertyKey:
|
||||
@ -1496,6 +1503,8 @@ class RiveCoreContext {
|
||||
return (object as RectangleBase).linkCornerRadius;
|
||||
case ClippingShapeBase.isVisiblePropertyKey:
|
||||
return (object as ClippingShapeBase).isVisible;
|
||||
case ArtboardBase.clipPropertyKey:
|
||||
return (object as ArtboardBase).clip;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1919,6 +1928,11 @@ class RiveCoreContext {
|
||||
object.offset = value;
|
||||
}
|
||||
break;
|
||||
case WorldTransformComponentBase.opacityPropertyKey:
|
||||
if (object is WorldTransformComponentBase) {
|
||||
object.opacity = value;
|
||||
}
|
||||
break;
|
||||
case TransformComponentBase.rotationPropertyKey:
|
||||
if (object is TransformComponentBase) {
|
||||
object.rotation = value;
|
||||
@ -1934,11 +1948,6 @@ class RiveCoreContext {
|
||||
object.scaleY = value;
|
||||
}
|
||||
break;
|
||||
case TransformComponentBase.opacityPropertyKey:
|
||||
if (object is TransformComponentBase) {
|
||||
object.opacity = value;
|
||||
}
|
||||
break;
|
||||
case NodeBase.xPropertyKey:
|
||||
if (object is NodeBase) {
|
||||
object.x = value;
|
||||
@ -2249,6 +2258,11 @@ class RiveCoreContext {
|
||||
object.isVisible = value;
|
||||
}
|
||||
break;
|
||||
case ArtboardBase.clipPropertyKey:
|
||||
if (object is ArtboardBase) {
|
||||
object.clip = value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user