add raster enabled/opacity
This commit is contained in:
@@ -46,6 +46,8 @@ enum class PropertyKey {
|
||||
CompositeEnabled,
|
||||
CompositeOpacity,
|
||||
|
||||
RasterEnabled,
|
||||
RasterOpacity,
|
||||
RasterSpin,
|
||||
RasterBrightnessLow,
|
||||
RasterBrightnessHigh,
|
||||
|
||||
@@ -129,6 +129,8 @@ void applyClassProperties(StyleProperties &style, const ClassProperties &propert
|
||||
applyProperty(properties, PropertyKey::CompositeOpacity, composite.opacity, z);
|
||||
} else if (style.is<RasterProperties>()) {
|
||||
RasterProperties &raster = style.get<RasterProperties>();
|
||||
applyProperty(properties, PropertyKey::RasterEnabled, raster.enabled, z);
|
||||
applyProperty(properties, PropertyKey::RasterOpacity, raster.opacity, z);
|
||||
applyProperty(properties, PropertyKey::RasterSpin, raster.spin, z);
|
||||
applyProperty(properties, PropertyKey::RasterBrightnessLow, raster.brightness[0], z);
|
||||
applyProperty(properties, PropertyKey::RasterBrightnessHigh, raster.brightness[1], z);
|
||||
|
||||
@@ -540,6 +540,10 @@ void StyleParser::parseStyle(JSVal value, ClassProperties &klass) {
|
||||
parseStyleProperty<FunctionProperty>("composite-opacity", Key::CompositeOpacity, klass, value);
|
||||
parseStyleProperty<ClassPropertyTransition>("composite-opacity-transition", Key::CompositeOpacity, klass, value);
|
||||
|
||||
parseStyleProperty<FunctionProperty>("raster-enabled", Key::RasterEnabled, klass, value);
|
||||
parseStyleProperty<ClassPropertyTransition>("raster-enabled-transition", Key::RasterEnabled, klass, value);
|
||||
parseStyleProperty<FunctionProperty>("raster-opacity", Key::RasterOpacity, klass, value);
|
||||
parseStyleProperty<ClassPropertyTransition>("raster-opacity-transition", Key::RasterOpacity, klass, value);
|
||||
parseStyleProperty<FunctionProperty>("raster-spin", Key::RasterSpin, klass, value);
|
||||
parseStyleProperty<ClassPropertyTransition>("raster-spin-transition", Key::RasterSpin, klass, value);
|
||||
parseStyleProperty<FunctionProperty>("raster-brightness-low", Key::RasterBrightnessLow, klass, value);
|
||||
|
||||
Reference in New Issue
Block a user