mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-21 21:51:03 +08:00
Run generate
just trying to flush through some of the bits coming out of running generate core runtime & generate core runtime without making a mess in other pr's . this is split into four commits which might be helpful when looking at the changes here. Diffs= ad72cfce5 Run generate (#5490) 7ee5f7d5a Increases the margin for the approx call to some of the wangs formula… (#5506) 2f224da7f Runtime ellipsis (#5482) Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
This commit is contained in:
@ -1 +1 @@
|
||||
ca58847887a2b2588d9bcc208314c7319db13a2a
|
||||
ad72cfce52f8d419dba13e578224736bd682593c
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/advanceable_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/layer_state.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/animation_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/layer_state_base.dart';
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/advanceable_state.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/any_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/layer_state.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/blend_animation_1d_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/blend_animation.dart';
|
||||
|
||||
abstract class BlendAnimation1DBase extends BlendAnimation {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/blend_animation_direct_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/blend_animation.dart';
|
||||
|
||||
abstract class BlendAnimationDirectBase extends BlendAnimation {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/blend_state_1d_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/layer_state_base.dart';
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/blend_animation_1d.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/blend_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/layer_state.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/blend_state_direct_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/layer_state_base.dart';
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/blend_animation_direct.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/cubic_ease_interpolator_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/cubic_interpolator.dart';
|
||||
|
||||
abstract class CubicEaseInterpolatorBase extends CubicInterpolator {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/cubic_interpolator_component_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class CubicInterpolatorComponentBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/cubic_value_interpolator_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/cubic_interpolator.dart';
|
||||
|
||||
abstract class CubicValueInterpolatorBase extends CubicInterpolator {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/entry_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/layer_state.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/exit_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/animation/state_machine_layer_component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/layer_state.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/keyframe_bool_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/keyframe.dart';
|
||||
|
||||
abstract class KeyFrameBoolBase extends KeyFrame {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/keyframe_color_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/keyframe.dart';
|
||||
|
||||
abstract class KeyFrameColorBase extends KeyFrame {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/keyframe_double_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/keyframe.dart';
|
||||
|
||||
abstract class KeyFrameDoubleBase extends KeyFrame {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/keyframe_id_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/keyframe.dart';
|
||||
|
||||
abstract class KeyFrameIdBase extends KeyFrame {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/keyframe_string_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/keyframe.dart';
|
||||
|
||||
abstract class KeyFrameStringBase extends KeyFrame {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/layer_state_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/state_machine_layer_component.dart';
|
||||
|
||||
abstract class LayerStateBase extends StateMachineLayerComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/linear_animation_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/animation.dart';
|
||||
|
||||
abstract class LinearAnimationBase extends Animation {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/listener_align_target_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/listener_action.dart';
|
||||
|
||||
abstract class ListenerAlignTargetBase extends ListenerAction {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/listener_input_change_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/listener_action.dart';
|
||||
|
||||
abstract class ListenerInputChangeBase extends ListenerAction {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_bool_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/nested_input.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_input_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class NestedInputBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_number_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/nested_input.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_remap_animation_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/generated/container_component_base.dart';
|
||||
import 'package:rive/src/generated/nested_animation_base.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_simple_animation_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/generated/container_component_base.dart';
|
||||
import 'package:rive/src/generated/nested_animation_base.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/nested_trigger_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/rive_core/animation/nested_input.dart';
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/state_machine_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/animation.dart';
|
||||
|
||||
abstract class StateMachineBase extends Animation {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/state_machine_input_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/state_machine_component.dart';
|
||||
|
||||
abstract class StateMachineInputBase extends StateMachineComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/state_machine_layer_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/state_machine_component.dart';
|
||||
|
||||
abstract class StateMachineLayerBase extends StateMachineComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/state_machine_listener_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/state_machine_component.dart';
|
||||
|
||||
abstract class StateMachineListenerBase extends StateMachineComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/state_transition_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/state_machine_layer_component.dart';
|
||||
|
||||
abstract class StateTransitionBase extends StateMachineLayerComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/transition_trigger_condition_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/transition_condition.dart';
|
||||
|
||||
abstract class TransitionTriggerConditionBase extends TransitionCondition {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/animation/transition_value_condition_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/animation/transition_condition.dart';
|
||||
|
||||
abstract class TransitionValueConditionBase extends TransitionCondition {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/assets/file_asset_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/assets/asset.dart';
|
||||
|
||||
abstract class FileAssetBase extends Asset {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/assets/folder_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/assets/asset.dart';
|
||||
|
||||
abstract class FolderBase extends Asset {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/bones/bone_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/generated/container_component_base.dart';
|
||||
import 'package:rive/src/generated/transform_component_base.dart';
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/bones/cubic_weight_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/rive_core/bones/weight.dart';
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/bones/root_bone_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/bones/skeletal_component_base.dart';
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/generated/container_component_base.dart';
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/bones/tendon_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TendonBase extends Component {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/bones/weight_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class WeightBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/constraints/constraint_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class ConstraintBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/container_component_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class ContainerComponentBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/custom_property_boolean_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class CustomPropertyBooleanBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/custom_property_number_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class CustomPropertyNumberBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/custom_property_string_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class CustomPropertyStringBase extends Component {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/draw_target_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class DrawTargetBase extends Component {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/joystick_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class JoystickBase extends Component {
|
||||
|
@ -131,6 +131,7 @@ import 'package:rive/src/rive_core/text/text_modifier_group.dart';
|
||||
import 'package:rive/src/rive_core/text/text_modifier_range.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style_axis.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style_feature.dart';
|
||||
import 'package:rive/src/rive_core/text/text_value_run.dart';
|
||||
import 'package:rive/src/rive_core/text/text_variation_modifier.dart';
|
||||
|
||||
@ -312,6 +313,8 @@ class RiveCoreContext {
|
||||
return Tendon();
|
||||
case TextModifierRangeBase.typeKey:
|
||||
return TextModifierRange();
|
||||
case TextStyleFeatureBase.typeKey:
|
||||
return TextStyleFeature();
|
||||
case TextVariationModifierBase.typeKey:
|
||||
return TextVariationModifier();
|
||||
case TextModifierGroupBase.typeKey:
|
||||
@ -1356,6 +1359,16 @@ class RiveCoreContext {
|
||||
object.offset = value;
|
||||
}
|
||||
break;
|
||||
case TextStyleFeatureBase.tagPropertyKey:
|
||||
if (object is TextStyleFeatureBase && value is int) {
|
||||
object.tag = value;
|
||||
}
|
||||
break;
|
||||
case TextStyleFeatureBase.featureValuePropertyKey:
|
||||
if (object is TextStyleFeatureBase && value is int) {
|
||||
object.featureValue = value;
|
||||
}
|
||||
break;
|
||||
case TextVariationModifierBase.axisTagPropertyKey:
|
||||
if (object is TextVariationModifierBase && value is int) {
|
||||
object.axisTag = value;
|
||||
@ -1585,6 +1598,8 @@ class RiveCoreContext {
|
||||
case TextModifierRangeBase.unitsValuePropertyKey:
|
||||
case TextModifierRangeBase.typeValuePropertyKey:
|
||||
case TextModifierRangeBase.modeValuePropertyKey:
|
||||
case TextStyleFeatureBase.tagPropertyKey:
|
||||
case TextStyleFeatureBase.featureValuePropertyKey:
|
||||
case TextVariationModifierBase.axisTagPropertyKey:
|
||||
case TextModifierGroupBase.modifierFlagsPropertyKey:
|
||||
case TextStyleBase.fontAssetIdPropertyKey:
|
||||
@ -1911,6 +1926,10 @@ class RiveCoreContext {
|
||||
return (object as TextModifierRangeBase).typeValue;
|
||||
case TextModifierRangeBase.modeValuePropertyKey:
|
||||
return (object as TextModifierRangeBase).modeValue;
|
||||
case TextStyleFeatureBase.tagPropertyKey:
|
||||
return (object as TextStyleFeatureBase).tag;
|
||||
case TextStyleFeatureBase.featureValuePropertyKey:
|
||||
return (object as TextStyleFeatureBase).featureValue;
|
||||
case TextVariationModifierBase.axisTagPropertyKey:
|
||||
return (object as TextVariationModifierBase).axisTag;
|
||||
case TextModifierGroupBase.modifierFlagsPropertyKey:
|
||||
@ -2639,6 +2658,16 @@ class RiveCoreContext {
|
||||
object.modeValue = value;
|
||||
}
|
||||
break;
|
||||
case TextStyleFeatureBase.tagPropertyKey:
|
||||
if (object is TextStyleFeatureBase) {
|
||||
object.tag = value;
|
||||
}
|
||||
break;
|
||||
case TextStyleFeatureBase.featureValuePropertyKey:
|
||||
if (object is TextStyleFeatureBase) {
|
||||
object.featureValue = value;
|
||||
}
|
||||
break;
|
||||
case TextVariationModifierBase.axisTagPropertyKey:
|
||||
if (object is TextVariationModifierBase) {
|
||||
object.axisTag = value;
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/shapes/clipping_shape_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class ClippingShapeBase extends Component {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/shapes/mesh_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/generated/component_base.dart';
|
||||
import 'package:rive/src/generated/container_component_base.dart';
|
||||
import 'package:rive/src/rive_core/container_component.dart';
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/shapes/paint/gradient_stop_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class GradientStopBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/shapes/paint/solid_color_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class SolidColorBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/shapes/paint/trim_path_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TrimPathBase extends Component {
|
||||
|
@ -1,3 +1,6 @@
|
||||
/// Core automatically generated lib/src/generated/text/text_modifier_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TextModifierBase extends Component {
|
||||
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/text/text_style_axis_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TextStyleAxisBase extends Component {
|
||||
|
66
lib/src/generated/text/text_style_feature_base.dart
Normal file
66
lib/src/generated/text/text_style_feature_base.dart
Normal file
@ -0,0 +1,66 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/text/text_style_feature_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TextStyleFeatureBase extends Component {
|
||||
static const int typeKey = 164;
|
||||
@override
|
||||
int get coreType => TextStyleFeatureBase.typeKey;
|
||||
@override
|
||||
Set<int> get coreTypes =>
|
||||
{TextStyleFeatureBase.typeKey, ComponentBase.typeKey};
|
||||
|
||||
/// --------------------------------------------------------------------------
|
||||
/// Tag field with key 356.
|
||||
static const int tagInitialValue = 0;
|
||||
int _tag = tagInitialValue;
|
||||
static const int tagPropertyKey = 356;
|
||||
int get tag => _tag;
|
||||
|
||||
/// Change the [_tag] field value.
|
||||
/// [tagChanged] will be invoked only if the field's value has changed.
|
||||
set tag(int value) {
|
||||
if (_tag == value) {
|
||||
return;
|
||||
}
|
||||
int from = _tag;
|
||||
_tag = value;
|
||||
if (hasValidated) {
|
||||
tagChanged(from, value);
|
||||
}
|
||||
}
|
||||
|
||||
void tagChanged(int from, int to);
|
||||
|
||||
/// --------------------------------------------------------------------------
|
||||
/// FeatureValue field with key 357.
|
||||
static const int featureValueInitialValue = 1;
|
||||
int _featureValue = featureValueInitialValue;
|
||||
static const int featureValuePropertyKey = 357;
|
||||
int get featureValue => _featureValue;
|
||||
|
||||
/// Change the [_featureValue] field value.
|
||||
/// [featureValueChanged] will be invoked only if the field's value has
|
||||
/// changed.
|
||||
set featureValue(int value) {
|
||||
if (_featureValue == value) {
|
||||
return;
|
||||
}
|
||||
int from = _featureValue;
|
||||
_featureValue = value;
|
||||
if (hasValidated) {
|
||||
featureValueChanged(from, value);
|
||||
}
|
||||
}
|
||||
|
||||
void featureValueChanged(int from, int to);
|
||||
|
||||
@override
|
||||
void copy(covariant TextStyleFeatureBase source) {
|
||||
super.copy(source);
|
||||
_tag = source._tag;
|
||||
_featureValue = source._featureValue;
|
||||
}
|
||||
}
|
@ -1,3 +1,7 @@
|
||||
/// Core automatically generated
|
||||
/// lib/src/generated/text/text_value_run_base.dart.
|
||||
/// Do not modify manually.
|
||||
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
|
||||
abstract class TextValueRunBase extends Component {
|
||||
|
@ -22,11 +22,6 @@ import 'package:rive_common/utilities.dart';
|
||||
|
||||
export 'package:rive/src/generated/artboard_base.dart';
|
||||
|
||||
class DrawFlags {
|
||||
static const int foreground = 1 << 0;
|
||||
static const int background = 1 << 1;
|
||||
}
|
||||
|
||||
class Artboard extends ArtboardBase with ShapePaintContainer {
|
||||
bool _frameOrigin = true;
|
||||
|
||||
@ -358,9 +353,8 @@ class Artboard extends ArtboardBase with ShapePaintContainer {
|
||||
|
||||
/// Draw the drawable components in this artboard.
|
||||
void draw(
|
||||
Canvas canvas, [
|
||||
int flags = DrawFlags.foreground | DrawFlags.background,
|
||||
]) {
|
||||
Canvas canvas,
|
||||
) {
|
||||
canvas.save();
|
||||
if (clip) {
|
||||
if (_frameOrigin) {
|
||||
@ -383,22 +377,21 @@ class Artboard extends ArtboardBase with ShapePaintContainer {
|
||||
if (_frameOrigin) {
|
||||
canvas.translate(width * originX, height * originY);
|
||||
}
|
||||
if (flags & (DrawFlags.background) != 0) {
|
||||
for (final fill in fills) {
|
||||
fill.draw(canvas, path);
|
||||
}
|
||||
}
|
||||
if (flags & (DrawFlags.foreground) != 0) {
|
||||
for (var drawable = _firstDrawable;
|
||||
drawable != null;
|
||||
drawable = drawable.prev) {
|
||||
if (drawable.isHidden || drawable.renderOpacity == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
drawable.draw(canvas);
|
||||
}
|
||||
for (final fill in fills) {
|
||||
fill.draw(canvas, path);
|
||||
}
|
||||
|
||||
for (var drawable = _firstDrawable;
|
||||
drawable != null;
|
||||
drawable = drawable.prev) {
|
||||
if (drawable.isHidden || drawable.renderOpacity == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
drawable.draw(canvas);
|
||||
}
|
||||
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
|
@ -4,15 +4,6 @@ import 'package:rive/src/rive_core/assets/asset.dart';
|
||||
|
||||
export 'package:rive/src/generated/backboard_base.dart';
|
||||
|
||||
class AssetPanelState {
|
||||
static const int collapseImages = 1 << 0;
|
||||
static const int collapselottie = 1 << 1;
|
||||
static const int collapseFonts = 1 << 2;
|
||||
static const int sortImages = 1 << 3;
|
||||
static const int sortLottie = 1 << 4;
|
||||
static const int sortFonts = 1 << 5;
|
||||
}
|
||||
|
||||
class Backboard extends BackboardBase {
|
||||
static final Backboard unknown = Backboard();
|
||||
|
||||
|
@ -439,7 +439,6 @@ class Text extends TextBase with TextStyleContainer {
|
||||
);
|
||||
_unicharCount = styled.value.length;
|
||||
_cleanupShapes.add(_shape!);
|
||||
|
||||
_lines =
|
||||
_shape?.breakLines(sizing == TextSizing.autoWidth ? -1 : width, align);
|
||||
|
||||
@ -532,4 +531,7 @@ class Text extends TextBase with TextStyleContainer {
|
||||
markShapeDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'Text(id: $id, text: $text)';
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:rive/src/generated/text/text_modifier_group_base.dart';
|
||||
import 'package:rive/src/rive_core/component_dirt.dart';
|
||||
import 'package:rive/src/rive_core/text/text.dart';
|
||||
import 'package:rive/src/rive_core/text/text_modifier.dart';
|
||||
import 'package:rive/src/rive_core/text/text_modifier_range.dart';
|
||||
import 'package:rive/src/rive_core/text/text_shape_modifier.dart';
|
||||
import 'package:rive/src/rive_core/text/text_variation_modifier.dart';
|
||||
import 'package:rive_common/math.dart';
|
||||
import 'package:rive_common/rive_text.dart';
|
||||
|
||||
@ -76,12 +77,16 @@ class TextModifierGroup extends TextModifierGroupBase {
|
||||
for (final range in _ranges) {
|
||||
range.clearRangeMap();
|
||||
}
|
||||
addDirt(ComponentDirt.textCoverage);
|
||||
}
|
||||
|
||||
/// Coverage is ultimately always expressed per unicode codepoint.
|
||||
Float32List _coverage = Float32List(1);
|
||||
int _textSize = -1;
|
||||
|
||||
@visibleForTesting
|
||||
Float32List get coverageValues => _coverage;
|
||||
|
||||
void computeRangeMap(String text, TextShapeResult? shape,
|
||||
BreakLinesResult? lines, GlyphLookup glyphLookup) {
|
||||
_textSize = text.length;
|
||||
@ -137,6 +142,7 @@ class TextModifierGroup extends TextModifierGroupBase {
|
||||
if (font == null) {
|
||||
return run;
|
||||
}
|
||||
|
||||
HashMap<int, double> axisVariations = run.userData is HashMap<int, double>
|
||||
? run.userData as HashMap<int, double>
|
||||
: HashMap<int, double>();
|
||||
@ -149,9 +155,10 @@ class TextModifierGroup extends TextModifierGroupBase {
|
||||
|
||||
if (axisVariations.isNotEmpty) {
|
||||
var varFont = font.withOptions(
|
||||
axisVariations.entries
|
||||
.map((entry) => FontAxisCoord(entry.key, entry.value)),
|
||||
[]);
|
||||
axisVariations.entries
|
||||
.map((entry) => FontAxisCoord(entry.key, entry.value)),
|
||||
[],
|
||||
);
|
||||
if (varFont != null) {
|
||||
_cleanupFonts.add(varFont);
|
||||
font = varFont;
|
||||
@ -190,6 +197,10 @@ class TextModifierGroup extends TextModifierGroupBase {
|
||||
TextModifierFlags.modifyOrigin)) !=
|
||||
0;
|
||||
|
||||
bool modifiesAxes(int tag) => modifiers
|
||||
.whereType<TextVariationModifier>()
|
||||
.any((modifier) => modifier.axisTag == tag);
|
||||
|
||||
double computeOpacity(double current, double t) {
|
||||
if (opacityInverted) {
|
||||
return current * (1 - t) + opacity * t;
|
||||
|
@ -143,8 +143,7 @@ class TextModifierRange extends TextModifierRangeBase {
|
||||
_computeRangeMappedCoverage(coverage, _rangeMapper!);
|
||||
}
|
||||
|
||||
// void _computeCharacterCoverage(Float32List coverage, TextShapeResult shape)
|
||||
// {
|
||||
// void _computeCharacterCoverage(Float32List coverage, TextShapeResult shape) {
|
||||
// var length = coverage.length;
|
||||
// _indexFrom = length * offsetModifyFrom;
|
||||
// _indexTo = length * offsetModifyTo;
|
||||
|
@ -12,6 +12,7 @@ import 'package:rive/src/rive_core/shapes/paint/shape_paint_mutator.dart';
|
||||
import 'package:rive/src/rive_core/shapes/shape_paint_container.dart';
|
||||
import 'package:rive/src/rive_core/text/text.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style_axis.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style_feature.dart';
|
||||
import 'package:rive/src/rive_core/text/text_value_run.dart';
|
||||
import 'package:rive_common/math.dart';
|
||||
import 'package:rive_common/rive_text.dart';
|
||||
@ -34,7 +35,7 @@ class TextVariationHelper extends Component {
|
||||
@override
|
||||
void update(int dirt) {
|
||||
_font?.dispose();
|
||||
_font = style._makeVariableFont();
|
||||
_font = style._makeFontVariation();
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
@ -57,7 +58,9 @@ class TextStyle extends TextStyleBase
|
||||
final Set<TextValueRun> _referencers = {};
|
||||
Text? get text => parent as Text?;
|
||||
final Set<TextStyleAxis> _variations = {};
|
||||
final Set<TextStyleFeature> _features = {};
|
||||
Iterable<TextStyleAxis> get variations => _variations;
|
||||
Iterable<TextStyleFeature> get features => _features;
|
||||
|
||||
Iterable<FontAxis> get variableAxes => asset?.font?.axes ?? [];
|
||||
bool get hasVariableAxes => asset?.font?.axes.isNotEmpty ?? false;
|
||||
@ -65,8 +68,22 @@ class TextStyle extends TextStyleBase
|
||||
TextVariationHelper? _variationHelper;
|
||||
TextVariationHelper? get variationHelper => _variationHelper;
|
||||
|
||||
Font? _makeVariableFont() => asset?.font?.withOptions(
|
||||
_variations.map((axis) => FontAxisCoord(axis.tag, axis.axisValue)), []);
|
||||
Iterable<FontTag> get fontFeatures => asset?.font?.features ?? [];
|
||||
|
||||
Font? _makeFontVariation() => asset?.font?.withOptions(
|
||||
_variations.map(
|
||||
(axis) => FontAxisCoord(
|
||||
axis.tag,
|
||||
axis.axisValue,
|
||||
),
|
||||
),
|
||||
_features.map(
|
||||
(feature) => FontFeature(
|
||||
feature.tag,
|
||||
feature.featureValue,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Font? get font => _variationHelper?.font ?? asset?.font;
|
||||
|
||||
@ -99,7 +116,8 @@ class TextStyle extends TextStyleBase
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => '${super.toString()} -> FontSize($fontSize)';
|
||||
String toString() => 'TextStyle(id: $id, size: $fontSize'
|
||||
')';
|
||||
|
||||
@override
|
||||
void buildDependencies() {
|
||||
@ -178,19 +196,33 @@ class TextStyle extends TextStyleBase
|
||||
_variationHelper ??= TextVariationHelper(this);
|
||||
addDirt(ComponentDirt.textShape);
|
||||
}
|
||||
} else if (component is TextStyleFeature) {
|
||||
if (_features.add(component)) {
|
||||
_variationHelper ??= TextVariationHelper(this);
|
||||
addDirt(ComponentDirt.textShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void childRemoved(Component component) {
|
||||
super.childRemoved(component);
|
||||
bool changed = false;
|
||||
if (component is TextStyleAxis) {
|
||||
if (_variations.remove(component)) {
|
||||
addDirt(ComponentDirt.textShape);
|
||||
if (_variations.isEmpty) {
|
||||
_variationHelper?.dispose();
|
||||
_variationHelper = null;
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
} else if (component is TextStyleFeature) {
|
||||
if (_features.remove(component)) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
addDirt(ComponentDirt.textShape);
|
||||
if (_variations.isEmpty && _features.isEmpty) {
|
||||
_variationHelper?.dispose();
|
||||
_variationHelper = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
import 'package:rive/src/generated/text/text_style_axis_base.dart';
|
||||
import 'package:rive/src/rive_core/component_dirt.dart';
|
||||
import 'package:rive/src/rive_core/text/text_style.dart';
|
||||
import 'package:rive_common/rive_text.dart';
|
||||
|
||||
export 'package:rive/src/generated/text/text_style_axis_base.dart';
|
||||
|
||||
class TextStyleAxis extends TextStyleAxisBase {
|
||||
@override
|
||||
bool validate() => super.validate() && parent is TextStyle;
|
||||
|
||||
String get tagName => FontTag.tagToName(tag);
|
||||
|
||||
@override
|
||||
|
20
lib/src/rive_core/text/text_style_feature.dart
Normal file
20
lib/src/rive_core/text/text_style_feature.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:rive/src/generated/text/text_style_feature_base.dart';
|
||||
import 'package:rive/src/rive_core/component_dirt.dart';
|
||||
import 'package:rive_common/rive_text.dart';
|
||||
|
||||
export 'package:rive/src/generated/text/text_style_feature_base.dart';
|
||||
|
||||
class TextStyleFeature extends TextStyleFeatureBase {
|
||||
String get tagName => FontTag.tagToName(tag);
|
||||
|
||||
@override
|
||||
void update(int dirt) {}
|
||||
|
||||
@override
|
||||
void featureValueChanged(int from, int to) {
|
||||
parent?.addDirt(ComponentDirt.textShape);
|
||||
}
|
||||
|
||||
@override
|
||||
void tagChanged(int from, int to) => parent?.addDirt(ComponentDirt.textShape);
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
import 'package:rive/src/core/core.dart';
|
||||
import 'package:rive/src/generated/text/text_value_run_base.dart';
|
||||
import 'package:rive/src/rive_core/container_component.dart';
|
||||
import 'package:rive/src/rive_core/text/text.dart';
|
||||
|
||||
import 'package:rive/src/rive_core/text/text_style.dart';
|
||||
|
||||
export 'package:rive/src/generated/text/text_value_run_base.dart';
|
||||
|
||||
class TextValueRun extends TextValueRunBase {
|
||||
|
Reference in New Issue
Block a user