Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Gegl.babl_variant(format, variant)¶
- Parameters:
format (
Babl.Object
) –variant (
Gegl.BablVariant
) –
- Return type:
- Gegl.cl_disable()¶
Disable OpenCL
- Gegl.cl_init()¶
- Raises:
- Returns:
True if OpenCL was initialized
- Return type:
Initialize and enable OpenCL, calling this function again will re-enable OpenCL if it has been disabled.
- Gegl.cl_is_accelerated()¶
- Returns:
True if OpenCL is initialized and enabled
- Return type:
Check if OpenCL is enabled.
- Gegl.config()¶
- Returns:
- Return type:
Returns a
Gegl.Config
object with properties that can be manipulated to control GEGLs behavior.
- Gegl.create_chain(ops, op_start, op_end, time, rel_dim, path_root)¶
- Parameters:
ops (
str
) – an argv style,None
terminated array of argumentsop_start (
Gegl.Node
) – node to pass in as input of chainop_end (
Gegl.Node
) – node to get processed datatime (
float
) – the time to use for interpolatino of keyframed valuesrel_dim (
int
) – relative dimension to scale rel suffixed values bypath_root (
str
) – path in filesystem to use as relative root
- Raises:
Create a node chain from an unparsed commandline string.
- Gegl.create_chain_argv(ops, op_start, op_end, time, rel_dim, path_root)¶
- Parameters:
ops (
str
) – an argv style,None
terminated array of argumentsop_start (
Gegl.Node
) – node to pass in as input of chainop_end (
Gegl.Node
) – node to get processed datatime (
float
) – the time to use for interpolatino of keyframed valuesrel_dim (
int
) – relative dimension to scale rel suffixed values bypath_root (
str
) – path in filesystem to use as relative root
- Raises:
Create a node chain from argv style list of op data.
- Gegl.exit()¶
Call this function when you’re done using GEGL. It will clean up caches and write/dump debug information if the correct debug flags are set.
- Gegl.format(format_name)¶
- Parameters:
format_name (
str
) – ABabl.Object
format name, e.g. “RGBA float”- Returns:
the format pointer
- Return type:
Returns a value sutable to pass to the
Gegl.Buffer
constructor or any other property that expects aBabl.Object
format.
- Gegl.format_get_name(format)¶
- Parameters:
format (
GObject.Value
) – ABabl.Object
pointer- Returns:
the format name
- Return type:
- Gegl.get_version()¶
- Returns:
- major:
a pointer to a int where the major version number will be stored
- minor:
ditto for the minor version number
- micro:
ditto for the micro version number
- Return type:
This function fetches the version of the GEGL library being used by the running process.
- Gegl.graph_dump_outputs(node)¶
- Parameters:
node (
Gegl.Node
) – The final node of the graph
Dump the bounds and format of each node in the graph to stdout.
- Gegl.graph_dump_request(node, roi)¶
- Parameters:
node (
Gegl.Node
) – The final node of the graphroi (
Gegl.Rectangle
) – The request rectangle
Dump the region that will be rendered for each node to fulfill the request.
- Gegl.has_operation(operation_type)¶
- Gegl.init(argv)¶
- Parameters:
argv ([
str
] orNone
) – a pointer to the array of command line arguments.- Returns:
a pointer to the array of command line arguments.
- Return type:
argv: [
str
]
Call this function before using any other GEGL functions. It will initialize everything needed to operate GEGL and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments.
Note that there is an alternative way to initialize GEGL: if you are calling
GLib.OptionContext.parse
() with the option group returned by #gegl_get_option_group(), you don’t have to callGegl.init
().
- Gegl.list_operations()¶
- Returns:
An alphabetically sorted array of available operation names. This excludes any compat-name registered by operations. The list should be freed with
GLib.free
after use. —str
**operations;int
n_operations;int
i;operations =
Gegl.list_operations
(&n_operations); g_print (“Available operations:\n”); for (i=0; i < n_operations; i++) { g_print (”\t%s\n”, operations[i]); }GLib.free
(operations);- Return type:
[
str
]
- Gegl.load_module_directory(path)¶
- Parameters:
path (
str
) – the directory to load modules from
Load all gegl modules found in the given directory.
- Gegl.parallel_distribute(max_n, func, *user_data)¶
- Parameters:
max_n (
int
) – the maximal number of threads to usefunc (
Gegl.ParallelDistributeFunc
) – the function to calluser_data (
object
orNone
) – user data to pass to the function
Distributes the execution of a function across multiple threads, by calling it with a different index on each thread.
- Gegl.parallel_distribute_area(area, thread_cost, split_strategy, func, *user_data)¶
- Parameters:
area (
Gegl.Rectangle
) – the area to processthread_cost (
float
) – the cost of using each additional thread, relative to the cost of processing a single data elementsplit_strategy (
Gegl.SplitStrategy
) – the strategy to use for dividing the areafunc (
Gegl.ParallelDistributeAreaFunc
) – the function to calluser_data (
object
orNone
) – user data to pass to the function
Distributes the processing of a planar data-structure across multiple threads, by calling the given function with different sub-areas on different threads.
- Gegl.parallel_distribute_range(size, thread_cost, func, *user_data)¶
- Parameters:
size (
int
) – the total size of the datathread_cost (
float
) – the cost of using each additional thread, relative to the cost of processing a single data elementfunc (
Gegl.ParallelDistributeRangeFunc
) – the function to calluser_data (
object
orNone
) – user data to pass to the function
Distributes the processing of a linear data-structure across multiple threads, by calling the given function with different sub-ranges on different threads.
- Gegl.param_spec_audio_fragment(name, nick, blurb, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
GObject.ParamSpec
instance specifying aGegl.AudioFragment
property.
- Gegl.param_spec_color(name, nick, blurb, default_color, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifieddefault_color (
Gegl.Color
) – the default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
GObject.ParamSpec
instance specifying aGegl.Color
property.
- Gegl.param_spec_color_from_string(name, nick, blurb, default_color_string, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifieddefault_color_string (
str
) – the default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
GObject.ParamSpec
instance specifying aGegl.Color
property.
- Gegl.param_spec_color_get_default(self)¶
- Parameters:
self (
GObject.ParamSpec
) – aGegl.Color
GObject.ParamSpec
- Returns:
the default
Gegl.Color
- Return type:
Get the default color value of the param spec
- Gegl.param_spec_curve(name, nick, blurb, default_curve, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifieddefault_curve (
Gegl.Curve
) – the default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
GObject.ParamSpec
instance specifying aGegl.Curve
property.
- Gegl.param_spec_double(name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedminimum (
float
) – minimum value for the property specifiedmaximum (
float
) – maximum value for the property specifieddefault_value (
float
) – default value for the property specifiedui_minimum (
float
) – minimum value a user should be allowed to inputui_maximum (
float
) – maximum value a user should be allowed to inputui_gamma (
float
) – the gamma that should be used when adjusting the valueflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecDouble
instance.
- Gegl.param_spec_enum(name, nick, blurb, enum_type, default_value, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedenum_type (
GObject.GType
) – the enum type to get valid values fromdefault_value (
int
) – default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecEnum
instance.
- Gegl.param_spec_file_path(name, nick, blurb, no_validate, null_ok, default_value, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedno_validate (
bool
) – true if the string should be validated withGLib.utf8_validate
default_value (
str
) – default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecFilePath
instance.
- Gegl.param_spec_format(name, nick, blurb, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecFormat
instance specifying aBabl.Object
format.
- Gegl.param_spec_get_property_key(pspec, key_name)¶
- Parameters:
pspec (
GObject.ParamSpec
) –key_name (
str
) –
- Return type:
- Gegl.param_spec_int(name, nick, blurb, minimum, maximum, default_value, ui_minimum, ui_maximum, ui_gamma, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedminimum (
int
) – minimum value for the property specifiedmaximum (
int
) – maximum value for the property specifieddefault_value (
int
) – default value for the property specifiedui_minimum (
int
) – minimum value a user should be allowed to inputui_maximum (
int
) – maximum value a user should be allowed to inputui_gamma (
float
) – the gamma that should be used when adjusting the valueflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecInt
instance.
- Gegl.param_spec_path(name, nick, blurb, default_path, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifieddefault_path (
Gegl.Path
) – the default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
GObject.ParamSpec
instance specifying aGegl.Path
property.
- Gegl.param_spec_seed(name, nick, blurb, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecSeed
instance specifying an integer random seed.
- Gegl.param_spec_set_property_key(pspec, key_name, value)¶
- Parameters:
pspec (
GObject.ParamSpec
) –key_name (
str
) –value (
str
) –
- Gegl.param_spec_string(name, nick, blurb, no_validate, null_ok, default_value, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedno_validate (
bool
) – true if the string should be validated withGLib.utf8_validate
default_value (
str
) – default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecString
instance.
- Gegl.param_spec_uri(name, nick, blurb, no_validate, null_ok, default_value, flags)¶
- Parameters:
name (
str
) – canonical name of the property specifiednick (
str
) – nick name for the property specifiedblurb (
str
) – description of the property specifiedno_validate (
bool
) – true if the string should be validated withGLib.utf8_validate
default_value (
str
) – default value for the property specifiedflags (
GObject.ParamFlags
) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new
Gegl.ParamSpecUri
instance.
- Gegl.rectangle_infinite_plane()¶
- Return type:
Returns a
Gegl.Rectangle
that represents an infininte plane.
- Gegl.reset_stats()¶
Resets the cumulative data gathered by the
Gegl.Stats
object returned byGegl.stats
().
- Gegl.serialize(start, end, basepath, serialize_flags)¶
- Parameters:
start (
Gegl.Node
) – first node in chain to serializeend (
Gegl.Node
) – last node in chain to serializebasepath (
str
) – top-level absolute path to turn into relative rootserialize_flags (
Gegl.SerializeFlag
) – anded together combination of:Gegl.SerializeFlag.TRIM_DEFAULTS
,Gegl.SerializeFlag.VERSION
,Gegl.SerializeFlag.INDENT
.
- Return type:
- Gegl.stats()¶
- Returns:
- Return type:
Returns a
Gegl.Stats
object with properties that can be read to monitor GEGL statistics.