template <class T, class A, class U, bool isOverridable = false> class DataDrivenPaintProperty {


template <class T, class A, class U, bool isOverridable = false>
class DataDrivenPaintProperty {
public:
    using TransitionableType = Transitionable<PropertyValue<T>>;
    using UnevaluatedType = Transitioning<PropertyValue<T>>;
    using EvaluatorType = DataDrivenPropertyEvaluator<T>;
    using PossiblyEvaluatedType = PossiblyEvaluatedPropertyValue<T>;
    using Type = T;
    static constexpr bool IsDataDriven = true;
    static constexpr bool IsOverridable = isOverridable;

    using Attribute = A;
    using AttributeList = TypeList<A>;
    using Uniform = U;
    using UniformList = TypeList<U>;
};
 
struct TextColor : DataDrivenPaintProperty<Color, attributes::fill_color, uniforms::fill_color, true> {
    static Color defaultValue() { return Color::black(); }
    static constexpr const char *name() { return "text-color"; }
    static constexpr auto expressionType() { return expression::type::ColorType{}; };
    template<typename T> static bool hasOverride(const T& t) { return !!t.textColor; };
};
 
 

 

posted @ 2021-03-13 23:36  py2020  阅读(75)  评论(0)    收藏  举报