| | 131 | { |
|---|
| | 132 | $from_width = "from: " . $options['from_width']; |
|---|
| | 133 | $width_attributes[] = $from_width; |
|---|
| | 134 | } |
|---|
| | 135 | |
|---|
| | 136 | if (isset($options['to_width'])) |
|---|
| | 137 | { |
|---|
| | 138 | $to_width = "to: " . $options['to_width']; |
|---|
| | 139 | $width_attributes[] = $to_width; |
|---|
| | 140 | } |
|---|
| | 141 | elseif (isset($options['by_width'])) |
|---|
| | 142 | { |
|---|
| | 143 | $by_width = "by: " . $options['by_width']; |
|---|
| | 144 | $width_attributes[] = $by_width; |
|---|
| | 145 | } |
|---|
| | 146 | |
|---|
| | 147 | if (isset($options['unit_width'])) |
|---|
| | 148 | { |
|---|
| | 149 | $unit_width = "unit: '" . $options['unit_width']; |
|---|
| | 150 | $width_attributes[] = $unit_width; |
|---|
| | 151 | } |
|---|
| | 152 | |
|---|
| | 153 | $width .= join(', ', $width_attributes); |
|---|
| | 154 | |
|---|
| | 155 | $width .= " }"; |
|---|
| | 156 | |
|---|
| | 157 | $dimensions[] = $width; |
|---|
| | 158 | } |
|---|
| | 159 | |
|---|
| | 160 | if (isset($options['from_height']) || isset($options['to_height']) || isset($options['by_height'])) |
|---|
| | 161 | { |
|---|
| | 162 | $height = ""; |
|---|
| | 163 | $height .= "height: { "; |
|---|
| | 164 | |
|---|
| | 165 | $height_attributes = array(); |
|---|
| | 166 | |
|---|
| | 167 | if (isset($options['from_height'])) |
|---|
| | 168 | { |
|---|
| | 169 | $from_height = "from: " . $options['from_height']; |
|---|
| | 170 | $height_attributes[] = $from_height; |
|---|
| | 171 | } |
|---|
| | 172 | |
|---|
| | 173 | if (isset($options['to_height'])) |
|---|
| | 174 | { |
|---|
| | 175 | $to_height = "to: " . $options['to_height']; |
|---|
| | 176 | $height_attributes[] = $to_height; |
|---|
| | 177 | } |
|---|
| | 178 | elseif (isset($options['by_height'])) |
|---|
| | 179 | { |
|---|
| | 180 | $by_height = "by: " . $options['by_height']; |
|---|
| | 181 | $height_attributes[] = $by_height; |
|---|
| | 182 | } |
|---|
| | 183 | |
|---|
| | 184 | if (isset($options['unit_height'])) |
|---|
| | 185 | { |
|---|
| | 186 | $unit_height = "unit: '" . $options['unit_height']; |
|---|
| | 187 | $height_attributes[] = $unit_height; |
|---|
| | 188 | } |
|---|
| | 189 | |
|---|
| | 190 | $height .= join(', ', $height_attributes); |
|---|
| | 191 | |
|---|
| | 192 | $height .= " }"; |
|---|
| | 193 | |
|---|
| | 194 | $dimensions[] = $height; |
|---|
| | 195 | } |
|---|
| | 196 | |
|---|
| | 197 | if (isset($options['opacity_from']) || isset($options['opacity_to'])) |
|---|
| | 198 | { |
|---|
| | 199 | $opacity = ""; |
|---|
| | 200 | $opacity .= "opacity: { "; |
|---|
| | 201 | |
|---|
| | 202 | $opacity_attributes = array(); |
|---|
| | 203 | |
|---|
| | 204 | if (isset($options['opacity_from'])) |
|---|
| | 205 | { |
|---|
| | 206 | $opacity_from = "from: " . $options['opacity_from']; |
|---|
| | 207 | $opacity_attributes[] = $opacity_from; |
|---|
| | 208 | } |
|---|
| | 209 | |
|---|
| | 210 | if (isset($options['opacity_to'])) |
|---|
| | 211 | { |
|---|
| | 212 | $opacity_to = "to: " . $options['opacity_to']; |
|---|
| | 213 | $opacity_attributes[] = $opacity_to; |
|---|
| | 214 | } |
|---|
| | 215 | |
|---|
| | 216 | $opacity .= join(', ', $opacity_attributes); |
|---|
| | 217 | |
|---|
| | 218 | $opacity .= " }"; |
|---|
| | 219 | |
|---|
| | 220 | $dimensions[] = $opacity; |
|---|
| | 221 | } |
|---|
| | 222 | |
|---|
| | 223 | if (isset($options['fontsize_from']) || isset($options['fontsize_to'])) |
|---|
| | 224 | { |
|---|
| | 225 | $fontsize = ""; |
|---|
| | 226 | $fontsize .= "fontSize: { "; |
|---|
| | 227 | |
|---|
| | 228 | $fontsize_attributes = array(); |
|---|
| | 229 | |
|---|
| | 230 | if (isset($options['fontsize_from'])) |
|---|
| 115 | | $width .= " from: " . $options['from_width']; |
|---|
| 116 | | } |
|---|
| 117 | | |
|---|
| 118 | | if (isset($options['to_width'])) |
|---|
| 119 | | { |
|---|
| 120 | | $width .= ", to: " . $options['to_width']; |
|---|
| 121 | | } |
|---|
| 122 | | elseif (isset($options['by_width'])) |
|---|
| 123 | | { |
|---|
| 124 | | $width .= ", by: " . $options['by_width']; |
|---|
| 125 | | } |
|---|
| 126 | | |
|---|
| 127 | | if (isset($options['unit_width'])) |
|---|
| 128 | | { |
|---|
| 129 | | $width .= ", unit: '" . $options['unit_width'] . "' "; |
|---|
| 130 | | } |
|---|
| 131 | | |
|---|
| 132 | | $width .= " }"; |
|---|
| 133 | | |
|---|
| 134 | | $dimensions[] = $width; |
|---|
| 135 | | } |
|---|
| 136 | | |
|---|
| 137 | | if (isset($options['from_height']) || isset($options['to_height']) || isset($options['by_height'])) |
|---|
| 138 | | { |
|---|
| 139 | | $height = ""; |
|---|
| 140 | | $height .= "height: {"; |
|---|
| 141 | | |
|---|
| 142 | | if (isset($options['from_height'])) |
|---|
| 143 | | { |
|---|
| 144 | | $height .= " from: " . $options['from_height']; |
|---|
| 145 | | } |
|---|
| 146 | | |
|---|
| 147 | | if (isset($options['to_height'])) |
|---|
| 148 | | { |
|---|
| 149 | | $height .= ", to: " . $options['to_height']; |
|---|
| 150 | | } |
|---|
| 151 | | elseif (isset($options['by_height'])) |
|---|
| 152 | | { |
|---|
| 153 | | $height .= ", by: " . $options['by_height']; |
|---|
| 154 | | } |
|---|
| 155 | | |
|---|
| 156 | | if (isset($options['unit_height'])) |
|---|
| 157 | | { |
|---|
| 158 | | $height .= ", unit: '" . $options['unit_height'] . "' "; |
|---|
| 159 | | } |
|---|
| 160 | | |
|---|
| 161 | | $height .= " }"; |
|---|
| 162 | | |
|---|
| 163 | | $dimensions[] = $height; |
|---|
| | 232 | $fontsize_from = "from: " . $options['fontsize_from']; |
|---|
| | 233 | $fontsize_attributes[] = $fontsize_from; |
|---|
| | 234 | } |
|---|
| | 235 | |
|---|
| | 236 | if (isset($options['fontsize_to'])) |
|---|
| | 237 | { |
|---|
| | 238 | $fontsize_to = "to: " . $options['fontsize_to']; |
|---|
| | 239 | $fontsize_attributes[] = $fontsize_to; |
|---|
| | 240 | } |
|---|
| | 241 | |
|---|
| | 242 | if (isset($options['fontsize_unit'])) |
|---|
| | 243 | { |
|---|
| | 244 | $fontsize_unit = "unit: " . $options['fontsize_unit']; |
|---|
| | 245 | $fontsize_attributes[] = $fontsize_unit; |
|---|
| | 246 | } |
|---|
| | 247 | else |
|---|
| | 248 | { |
|---|
| | 249 | $fontsize_unit = "unit: '%'"; |
|---|
| | 250 | $fontsize_attributes[] = $fontsize_unit; |
|---|
| | 251 | } |
|---|
| | 252 | |
|---|
| | 253 | $fontsize .= join(', ', $fontsize_attributes); |
|---|
| | 254 | |
|---|
| | 255 | $fontsize .= " }"; |
|---|
| | 256 | |
|---|
| | 257 | $dimensions[] = $fontsize; |
|---|