* @param null $book\r
* @return wsHTML5Compiler\r
*/\r
- public static function compilerFactory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, $book = null,$forceTheme=false)\r
+ public static function compilerFactory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, $book = null, $forceTheme = false)\r
{\r
if (is_null($version)) {\r
global $core;\r
}\r
}\r
\r
- return new wsHTML5Compiler($book_id, $version, $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home, $book,$forceTheme);\r
+ return new wsHTML5Compiler($book_id, $version, $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home, $book, $forceTheme);\r
}\r
\r
public static function getPhonegapVersion($v = 'latest')\r
return implode(';', $res) . ';';\r
}\r
\r
- public static function colorToArray($color, $forceAlpha = null)\r
- {\r
- $color = ltrim($color, '#');\r
- if (strlen($color) == 6) {\r
- $hex = $color;\r
- $alpha = 1;\r
- } else {\r
- $alpha = hexdec(substr($color, 0, 2)) / 255;\r
- $hex = substr($color, 2, 6);\r
- }\r
-\r
- if (!is_null($forceAlpha)) {\r
- $alpha = $forceAlpha;\r
- }\r
-\r
- return array('hex' => strtoupper($hex), 'opacity' => number_format($alpha, 3, '.', ''));\r
- }\r
-\r
public static function colorToCSS($color, $forceAlpha = null)\r
{\r
return CubeIT_Graphics_Color::colorToCSS($color, $forceAlpha);\r
$this->lessVariables['book-page-ratio'] = floatval($w) / floatval($h);
$this->lessVariables['page-shade-opacity'] = min(1, $this->theme->parametres->shadeAlpha / 50);
- $this->lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2;
+ $c= new CubeIT_Graphics_Color($this->theme->parametres->bookShadeColor);
+ $this->lessVariables['shadow-opacity'] = $c->getAlpha() * 1.2;
$this->lessVariables['edges-display'] = $this->_lessBoolean($this->theme->parametres->usePageEdges);
$this->lessVariables['edge-left-offset'] = 0;
$this->lessVariables['edge-right-offset'] = 0;