本文整理汇总了C++中GEGL_OPERATION_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GEGL_OPERATION_CLASS函数的具体用法?C++ GEGL_OPERATION_CLASS怎么用?C++ GEGL_OPERATION_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GEGL_OPERATION_CLASS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gimp_operation_hardlight_mode_class_init
static void
gimp_operation_hardlight_mode_class_init (GimpOperationHardlightModeClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
"name", "gimp:hardlight-mode",
"description", "GIMP hardlight mode operation",
NULL);
operation_class->prepare = gimp_operation_hardlight_mode_prepare;
point_class->process = gimp_operation_hardlight_mode_process;
}
示例2: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:subtract";
operation_class->categories = "compositors:math";
operation_class->description =
_("Math operation subtract (c = c - value)");
}
示例3: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->process = process;
operation_class->get_bounding_box = get_bounding_box;
operation_class->detect = detect;
operation_class->no_cache = TRUE;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:clone",
"description", _("Clone a buffer"),
"categories", "core",
NULL);
}
示例4: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:average";
operation_class->categories = "compositors:blend";
operation_class->description =
_("Image blending operation 'average' (<tt>c = (cA + aB)/2</tt>)");
}
示例5: gimp_operation_anti_erase_mode_class_init
static void
gimp_operation_anti_erase_mode_class_init (GimpOperationAntiEraseModeClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
"name", "gimp:anti-erase-mode",
"description", "GIMP anti erase mode operation",
NULL);
operation_class->prepare = gimp_operation_anti_erase_mode_prepare;
point_class->process = gimp_operation_anti_erase_mode_process;
}
示例6: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:svg-multiply";
operation_class->description =
_("SVG blend operation svg-multiply (<tt>d = cA * cB + cA * (1 - aB) + cB * (1 - aA)</tt>)");
operation_class->categories = "compositors:svgfilter";
}
示例7: gegl_op_class_init
static void
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->attach = attach;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:high-pass",
"title", _("High Pass Filter"),
"categories", "frequency",
"description",
_("Enhances fine details."),
NULL);
}
示例8: gegl_operation_get_key
const gchar *
gegl_operation_get_key (const gchar *operation_name,
const gchar *key_name)
{
GType type;
GObjectClass *klass;
const gchar *ret = NULL;
type = gegl_operation_gtype_from_name (operation_name);
if (!type)
{
return NULL;
}
klass = g_type_class_ref (type);
ret = gegl_operation_class_get_key (GEGL_OPERATION_CLASS (klass), key_name);
g_type_class_unref (klass);
return ret;
}
示例9: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
point_filter_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:dt-gamma";
operation_class->categories = "compositors:math";
operation_class->description =
_("Linear/Gamma conversion curve.");
}
示例10: gimp_operation_normal_parent_process
static gboolean
gimp_operation_normal_parent_process (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_prop,
const GeglRectangle *result,
gint level)
{
const GeglRectangle *in_extent = NULL;
const GeglRectangle *aux_extent = NULL;
GObject *input;
GObject *aux;
/* get the raw values this does not increase the reference count */
input = gegl_operation_context_get_object (context, "input");
aux = gegl_operation_context_get_object (context, "aux");
/* pass the input/aux buffers directly through if they are not
* overlapping
*/
if (input)
in_extent = gegl_buffer_get_abyss (GEGL_BUFFER (input));
if (! input ||
(aux && ! gegl_rectangle_intersect (NULL, in_extent, result)))
{
gegl_operation_context_set_object (context, "output", aux);
return TRUE;
}
if (aux)
aux_extent = gegl_buffer_get_abyss (GEGL_BUFFER (aux));
if (! aux ||
(input && ! gegl_rectangle_intersect (NULL, aux_extent, result)))
{
gegl_operation_context_set_object (context, "output", input);
return TRUE;
}
/* chain up, which will create the needed buffers for our actual
* process function
*/
return GEGL_OPERATION_CLASS (parent_class)->process (operation, context,
output_prop, result,
level);
}
示例11: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
"name" , "gegl:unpremul",
"categories" , "color",
"description" , "Unpremultiplies a buffer that contains pre-multiplied colors (but is marked as not having it)",
NULL);
}
示例12: gimp_operation_grain_merge_mode_class_init
static void
gimp_operation_grain_merge_mode_class_init (GimpOperationGrainMergeModeClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
"name", "gimp:grain-merge-mode",
"description", "GIMP grain merge mode operation",
NULL);
operation_class->prepare = gimp_operation_grain_merge_mode_prepare;
point_class->process = gimp_operation_grain_merge_mode_process;
}
示例13: gegl_chant_class_init
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:weighted-blend";
operation_class->categories = "compositors:blend";
operation_class->description =
_("blend two images using alpha values as weights");
}
示例14: operation_process
/* Fast paths */
static gboolean operation_process (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_prop,
const GeglRectangle *result,
gint level)
{
GeglOperationClass *operation_class;
gpointer input, aux;
operation_class = GEGL_OPERATION_CLASS (gegl_chant_parent_class);
/* get the raw values this does not increase the reference count */
input = gegl_operation_context_get_object (context, "input");
aux = gegl_operation_context_get_object (context, "aux");
/* pass the input/aux buffers directly through if they are alone*/
{
const GeglRectangle *in_extent = NULL;
const GeglRectangle *aux_extent = NULL;
if (input)
in_extent = gegl_buffer_get_abyss (input);
if ((!input ||
(aux && !gegl_rectangle_intersect (NULL, in_extent, result))))
{
gegl_operation_context_take_object (context, "output",
g_object_ref (aux));
return TRUE;
}
if (aux)
aux_extent = gegl_buffer_get_abyss (aux);
if (!aux ||
(input && !gegl_rectangle_intersect (NULL, aux_extent, result)))
{
gegl_operation_context_take_object (context, "output",
g_object_ref (input));
return TRUE;
}
}
/* chain up, which will create the needed buffers for our actual
* process function
*/
return operation_class->process (operation, context, output_prop, result, level);
}
示例15: gegl_op_class_init
static void
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
filter_class->process = process;
operation_class->prepare = prepare;
gegl_operation_class_set_keys (operation_class,
"name" , "gegl:kuwahara",
"categories" , "misc",
"description" , _("Edge preserving blur"),
NULL);
}