[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/ctools/includes/ -> stylizer.inc (summary)

(no description)

File Size: 1740 lines (53 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ctools_stylizer_image_processor:: (45 methods):
  execute()
  log()
  set_current_workspace()
  command_new()
  command_load()
  command_new_from()
  command_workspace()
  command_merge_from()
  command_merge_to()
  command_merge_from_file()
  command_fill()
  command_gradient()
  command_colorize()
  command_hue()
  command_slice()
  new_image()
  merge()
  ctools_stylizer_get_settings_cache()
  ctools_stylizer_set_settings_cache()
  ctools_stylizer_clear_settings_cache()
  ctools_stylizer_edit_style()
  ctools_stylizer_add_plugin_forms()
  ctools_stylizer_edit_style_finish()
  ctools_stylizer_edit_style_next()
  ctools_stylizer_edit_style_cancel()
  ctools_stylizer_edit_style_form_choose()
  ctools_stylizer_edit_style_form_choose_submit()
  ctools_stylizer_edit_style_form_default()
  theme_ctools_stylizer_color_scheme_form()
  theme_ctools_stylizer_preview_form()
  ctools_stylizer_edit_style_form_default_validate()
  ctools_stylizer_edit_style_form_default_submit()
  ctools_stylizer_font_selector_form()
  ctools_stylizer_font_selector_form_submit()
  ctools_stylizer_font_apply_style()
  ctools_stylizer_border_selector_form()
  ctools_stylizer_border_selector_form_submit()
  ctools_stylizer_border_apply_style()
  ctools_stylizer_padding_selector_form()
  ctools_stylizer_padding_selector_form_submit()
  ctools_stylizer_padding_apply_style()
  ctools_file_check_directory()
  ctools_color_blend()
  ctools_color_unpack()
  ctools_color_gd()

Defines 45 functions

  ctools_get_style_base()
  ctools_get_style_bases()
  ctools_get_style_base_types()
  ctools_stylizer_print_style_icon()
  theme_ctools_style_icon()
  ctools_stylizer_add_css()
  ctools_stylizer_build_style()
  ctools_stylizer_cleanup_style()
  ctools_stylizer_recursive_delete()
  ctools_stylizer_get_settings_name()
  ctools_stylizer_get_image_path()
  ctools_stylizer_get_css_id()
  ctools_stylizer_get_css_class()

Class: ctools_stylizer_image_processor  - X-Ref

execute($path, $plugin, $settings)   X-Ref
No description

log($message, $type = 'normal')   X-Ref
No description

set_current_workspace($workspace)   X-Ref
No description

command_new($name, $width, $height)   X-Ref
Create a new workspace.


command_load($name, $file)   X-Ref
Create a new workspace a file.

This will make the new workspace the current workspace.

command_new_from($name, $workspace)   X-Ref
Create a new workspace using the properties of an existing workspace


command_workspace($name)   X-Ref
Set the current workspace.


command_merge_from($workspace, $x = 0, $y = 0)   X-Ref
Copy the contents of one workspace into the current workspace.


command_merge_to($workspace, $x = 0, $y = 0)   X-Ref
No description

command_merge_from_file($file, $x = 0, $y = 0)   X-Ref
Blend an image into the current workspace.


command_fill($color, $x, $y, $width, $height)   X-Ref
No description

command_gradient($from, $to, $x, $y, $width, $height, $direction = 'down')   X-Ref
No description

command_colorize($color, $x = NULL, $y = NULL, $width = NULL, $height = NULL)   X-Ref
Colorize the current workspace with the given location.

This uses simple color blending to colorize the image.


command_hue($color, $x = NULL, $y = NULL, $width = NULL, $height = NULL)   X-Ref
Colorize the current workspace with the given location.

This uses a color replacement algorithm that retains luminosity but
turns replaces all color with the specified color.

command_slice($file, $x = NULL, $y = NULL, $width = NULL, $height = NULL)   X-Ref
Take a slice out of the current workspace and save it as an image.


new_image(&$source, $width = NULL, $height = NULL)   X-Ref
Prepare a new image for being copied or worked on, preserving transparency.


merge(&$from, &$to, $x, $y)   X-Ref
Merge two images together, preserving alpha transparency.


ctools_stylizer_get_settings_cache($name)   X-Ref
Get the cached changes to a given task handler.


ctools_stylizer_set_settings_cache($name, $settings)   X-Ref
Store changes to a task handler in the object cache.


ctools_stylizer_clear_settings_cache($name)   X-Ref
Remove an item from the object cache.


ctools_stylizer_edit_style(&$info, $js, $step = NULL)   X-Ref
Add a new style of the specified type.


ctools_stylizer_add_plugin_forms(&$form_info, $plugin, $op)   X-Ref
Add wizard forms specific to a style base plugin.

The plugin can store forms either as a simple 'edit form'
=> 'form callback' or if it needs the more complicated wizard
functionality, it can set 'forms' and 'order' with values suitable
for the wizard $form_info array.

param: &$form_info
param: $plugin
param: $op

ctools_stylizer_edit_style_finish(&$form_state)   X-Ref
Callback generated when the add style process is finished.


ctools_stylizer_edit_style_next(&$form_state)   X-Ref
Callback generated when the 'next' button is clicked.


ctools_stylizer_edit_style_cancel(&$form_state)   X-Ref
Callback generated when the 'cancel' button is clicked.

We might have some temporary data lying around. We must remove it.

ctools_stylizer_edit_style_form_choose(&$form, &$form_state)   X-Ref
Choose which plugin to use to create a new style.


ctools_stylizer_edit_style_form_choose_submit(&$form, &$form_state)   X-Ref
No description

ctools_stylizer_edit_style_form_default(&$form, &$form_state)   X-Ref
The default stylizer style editing form.

Even when not using this, styles should call through to this form in
their own edit forms.

theme_ctools_stylizer_color_scheme_form($form)   X-Ref
Theme the stylizer color scheme form.


theme_ctools_stylizer_preview_form($form)   X-Ref
Theme the stylizer preview form.


ctools_stylizer_edit_style_form_default_validate($form, &$form_state)   X-Ref
No description

ctools_stylizer_edit_style_form_default_submit($form, &$form_state)   X-Ref
No description

ctools_stylizer_font_selector_form(&$form, &$form_state, $label, $settings)   X-Ref
Font selector form


ctools_stylizer_font_selector_form_submit(&$form, &$form_state, &$values, &$settings)   X-Ref
Copy font selector information into the settings


ctools_stylizer_font_apply_style(&$stylesheet, $selector, $settings)   X-Ref
No description

ctools_stylizer_border_selector_form(&$form, &$form_state, $label, $settings)   X-Ref
Border selector form


ctools_stylizer_border_selector_form_submit(&$form, &$form_state, &$values, &$settings)   X-Ref
Copy border selector information into the settings


ctools_stylizer_border_apply_style(&$stylesheet, $selector, $settings, $color, $which = NULL)   X-Ref
No description

ctools_stylizer_padding_selector_form(&$form, &$form_state, $label, $settings)   X-Ref
padding selector form


ctools_stylizer_padding_selector_form_submit(&$form, &$form_state, &$values, &$settings)   X-Ref
Copy padding selector information into the settings


ctools_stylizer_padding_apply_style(&$stylesheet, $selector, $settings)   X-Ref
No description

ctools_file_check_directory(&$directory, $mode = 0, $form_item = NULL)   X-Ref
Check to see that a directory exists.

This is an exact copy of core's, but without the stupid drupal_set_message
because we need this to be silent.


ctools_color_blend($img, $hex1, $hex2, $alpha)   X-Ref
Blend two hex colors and return the GD color.


ctools_color_unpack($hex, $normalize = false)   X-Ref
Convert a hex color into an RGB triplet.


ctools_color_gd($img, $hex)   X-Ref
Convert a hex triplet into a GD color.


Functions
Functions that are not part of a class:

ctools_get_style_base($style_base)   X-Ref
Fetch metadata on a specific style_base plugin.

param: $content type
return:

ctools_get_style_bases()   X-Ref
Fetch metadata for all style_base plugins.

return:

ctools_get_style_base_types()   X-Ref
Fetch metadata about all of the style base types that are available.


ctools_stylizer_print_style_icon($plugin, $print_title = TRUE)   X-Ref
Render the icon for a style base.


theme_ctools_style_icon($image, $title = NULL)   X-Ref
Theme the style icon image


ctools_stylizer_add_css($plugin, $settings)   X-Ref
Add the necessary CSS for a stylizer plugin to the page.

This will check to see if the images directory and the cached CSS
exists and, if not, will regenerate everything needed.

ctools_stylizer_build_style($plugin, $settings, $add_css = FALSE)   X-Ref
Build the files for a stylizer given the proper settings.


ctools_stylizer_cleanup_style($plugin, $settings)   X-Ref
Clean up no longer used files.

To prevent excess clutter in the files directory, this should be called
whenever a style is going out of use. When being deleted, but also when
the palette is being changed.

ctools_stylizer_recursive_delete($path)   X-Ref
Recursively delete all files and folders in the specified filepath, then
delete the containing folder.

Note that this only deletes visible files with write permission.

param: string $path

ctools_stylizer_get_settings_name($settings)   X-Ref
Get a safe name for the settings.

This uses an md5 of the palette if the name is temporary so
that multiple temporary styles on the same page can coexist
safely.

ctools_stylizer_get_image_path($plugin, $settings, $check = TRUE)   X-Ref
Get the path where images will be stored for a given style plugin and settings.

This function will make sure the path exists.

ctools_stylizer_get_css_id($plugin, $settings)   X-Ref
Get the id used to cache CSS for a given style plugin and settings.


ctools_stylizer_get_css_class($plugin, $settings)   X-Ref
Get the class to use for a stylizer plugin.




Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7