public static function TextimageStyles::buildFromEffectsOutline in Textimage 7.3
Build a virtual style from an effects data outline.
This is used to enable the direct creation of a textimage using core image module functions and API. The style array returned is 'virtual', i.e. it does not get saved to db. It is used to be passed to image_style_create_derivative() to build a picture.
Parameters
array $effects_outline: a simple array, where each element is an associative array of 'name' => the effect name 'data' => the effect data
Return value
array image style
1 call to TextimageStyles::buildFromEffectsOutline()
- Textimage::buildImage in classes/
Textimage.inc - Build the image via core image_style_create_derivative() function.
File
- classes/
TextimageStyles.inc, line 281 - Textimage - Styles handling class.
Class
- TextimageStyles
- Styles management class.
Code
public static function buildFromEffectsOutline($effects_outline) {
$definitions = image_effect_definitions();
$style = array();
$style['effects'] = array();
foreach ($effects_outline as $effect) {
if ($ed = $definitions[$effect['name']]) {
$ed['data'] = $effect['data'];
$style['effects'][] = $ed;
}
}
return $style;
}