From e77b3d71c45cf2c1737dad1166695b11e00e3883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Fri, 27 Jun 2014 17:13:21 +0200 Subject: [PATCH] add raster enabled/opacity --- include/llmr/style/property_key.hpp | 2 ++ src/style/style.cpp | 2 ++ src/style/style_parser.cpp | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/include/llmr/style/property_key.hpp b/include/llmr/style/property_key.hpp index e35587239..47d0d2b78 100644 --- a/include/llmr/style/property_key.hpp +++ b/include/llmr/style/property_key.hpp @@ -46,6 +46,8 @@ enum class PropertyKey { CompositeEnabled, CompositeOpacity, + RasterEnabled, + RasterOpacity, RasterSpin, RasterBrightnessLow, RasterBrightnessHigh, diff --git a/src/style/style.cpp b/src/style/style.cpp index df14673f8..4f23cd5bb 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -129,6 +129,8 @@ void applyClassProperties(StyleProperties &style, const ClassProperties &propert applyProperty(properties, PropertyKey::CompositeOpacity, composite.opacity, z); } else if (style.is()) { RasterProperties &raster = style.get(); + 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); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 22d6d617c..84ad6ada4 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -540,6 +540,10 @@ void StyleParser::parseStyle(JSVal value, ClassProperties &klass) { parseStyleProperty("composite-opacity", Key::CompositeOpacity, klass, value); parseStyleProperty("composite-opacity-transition", Key::CompositeOpacity, klass, value); + parseStyleProperty("raster-enabled", Key::RasterEnabled, klass, value); + parseStyleProperty("raster-enabled-transition", Key::RasterEnabled, klass, value); + parseStyleProperty("raster-opacity", Key::RasterOpacity, klass, value); + parseStyleProperty("raster-opacity-transition", Key::RasterOpacity, klass, value); parseStyleProperty("raster-spin", Key::RasterSpin, klass, value); parseStyleProperty("raster-spin-transition", Key::RasterSpin, klass, value); parseStyleProperty("raster-brightness-low", Key::RasterBrightnessLow, klass, value);