示例#1
0
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->process = operation_process;
  operation_class->prepare = prepare;

  operation_class->compat_name = "gegl:hard-light";
  gegl_operation_class_set_keys (operation_class,
  "name"        , "svg:hard-light",
  "description" ,
        _("SVG blend operation hard-light (<code>if 2 * cA < aA: d = 2 * cA * cB + cA * (1 - aB) + cB * (1 - aA) otherwise: d = aA * aB - 2 * (aB - cB) * (aA - cA) + cA * (1 - aB) + cB * (1 - aA)</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#2
0
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;

    gegl_operation_class_set_keys (operation_class,
                                   "name"       , "gegl:threshold",
                                   "categories" , "color",
                                   "description",
                                   _("Thresholds the image to white/black based on either the global value "
                                     "set in the value property, or per pixel from the aux input."),
                                   "cl-source"  , kernel_source,
                                   NULL);
}
示例#3
0
文件: divide.c 项目: jonnor/gegl
static void
gegl_op_class_init (GeglOpClass *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;

  gegl_operation_class_set_keys (operation_class,
  "name"        , "gegl:divide",
  "title"       , "Divide",
  "categories"  , "compositors:math",
  "reference-hash"  , "c3bd84f8a6b2c03a239f3f832597592c",
  "description" ,
       _("Math operation divide, performs the operation per pixel, using either the constant provided in 'value' or the corresponding pixel from the buffer on aux as operands. The result is the evaluation of the expression result = value==0.0f?0.0f:input/value"),
       NULL);
}
示例#4
0
static void
gegl_op_class_init (GeglOpClass *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->process      = operation_process;
  operation_class->prepare      = prepare;

  gegl_operation_class_set_keys (operation_class,
  "name"        , "gegl:soft-light",
  "title"       , "Soft-light",
  "description" ,
        _("SVG blend operation soft-light (<code>if 2 * cA < aA: d = cB * (aA - (aB == 0 ? 1 : 1 - cB / aB) * (2 * cA - aA)) + cA * (1 - aB) + cB * (1 - aA); if 8 * cB <= aB: d = cB * (aA - (aB == 0 ? 1 : 1 - cB / aB) * (2 * cA - aA) * (aB == 0 ? 3 : 3 - 8 * cB / aB)) + cA * (1 - aB) + cB * (1 - aA); otherwise: d = (aA * cB + (aB == 0 ? 0 : sqrt (cB / aB) * aB - cB) * (2 * cA - aA)) + cA * (1 - aB) + cB * (1 - aA)</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#5
0
文件: screen.c 项目: jonnor/gegl
static void
gegl_op_class_init (GeglOpClass *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->process      = operation_process;
  operation_class->prepare      = prepare;

  gegl_operation_class_set_keys (operation_class,
  "name"        , "svg:screen",
  "compat-name" , "gegl:screen",
  "reference-hash" , "dd4057b688a2721774557d5637e59a50",
  "description" ,
        _("SVG blend operation screen (<code>d = cA + cB - cA * cB</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#6
0
文件: color-burn.c 项目: GNOME/gegl
static void
gegl_op_class_init (GeglOpClass *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->process      = operation_process;
  operation_class->prepare      = prepare;

  gegl_operation_class_set_keys (operation_class,
  "name"        , "svg:color-burn",
  "compat-name" , "gegl:color-burn",
  "title"       , "Color-burn",
  "description" ,
        _("SVG blend operation color-burn (<code>if cA * aB + cB * aA <= aA * aB: d = cA * (1 - aB) + cB * (1 - aA) otherwise: d = (cA == 0 ? 1 : (aA * (cA * aB + cB * aA - aA * aB) / cA) + cA * (1 - aB) + cB * (1 - aA))</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#7
0
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->process = operation_process;
  operation_class->prepare = prepare;

  operation_class->compat_name = "gegl:exclusion";

  gegl_operation_class_set_keys (operation_class,
  "name"        , "svg:exclusion",
  "description" ,
        _("SVG blend operation exclusion (<code>d = (cA * aB + cB * aA - 2 * cA * cB) + cA * (1 - aB) + cB * (1 - aA)</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#8
0
文件: xor.c 项目: ChristianBusch/gegl
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;


  gegl_operation_class_set_keys (operation_class,
    "name"       , "svg:xor",
    "compat-name", "gegl:xor",
    "categories" , "compositors:porter-duff",
    "description",
        _("Porter Duff operation xor (d = cA * (1.0f - aB)+ cB * (1.0f - aA))"),
        NULL);
 

}
示例#9
0
static void
gegl_op_class_init (GeglOpClass *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->process      = operation_process;
  operation_class->prepare      = prepare;

  gegl_operation_class_set_keys (operation_class,
  "name"        , "svg:overlay",
  "compat-name" , "gegl:overlay",
  "title"       , "Overlay",
  "reference-hash" , "0148854c1b7d80cca8f015e216ce8fa3",
  "description" ,
        _("SVG blend operation overlay (<code>if 2 * cB > aB: d = 2 * cA * cB + cA * (1 - aB) + cB * (1 - aA) otherwise: d = aA * aB - 2 * (aB - cB) * (aA - cA) + cA * (1 - aB) + cB * (1 - aA)</code>)"),
        NULL);
  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
}
示例#10
0
文件: over.c 项目: dankamongmen/gegl
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);
  operation_class->prepare = prepare;
  operation_class->process = operation_process;

  point_composer_class->process = process;

  operation_class->compat_name = "gegl:over";

  gegl_operation_class_set_keys (operation_class,
    "name"       , "svg:src-over",
    "categories" , "compositors:porter-duff",
    "description",
          _("Porter Duff operation over (d = cA + cB * (1 - aA))"),
    "cl-source"  , svg_src_over_cl_source,
    NULL);
}
示例#11
0
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);

  operation_class->prepare = prepare;
  operation_class->process = operation_process;
  point_composer_class->process = process;
  point_composer_class->cl_process = cl_process;

  operation_class->opencl_support = TRUE;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:opacity",
    "categories" , "transparency",
    "description",
          _("Weights the opacity of the input both the value of the aux"
            " input and the global value property."),
    NULL);
}
示例#12
0
文件: over.c 项目: Distrotech/gegl
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass              *operation_class;
  GeglOperationPointComposerClass *point_composer_class;

  operation_class      = GEGL_OPERATION_CLASS (klass);
  point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
  operation_class->prepare = prepare;
  operation_class->process = operation_process;

  point_composer_class->cl_process = cl_process;
  point_composer_class->process    = process;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "svg:src-over",
    "title",       _("Normal compositing"),
    "compat-name", "gegl:over",
    "categories" , "compositors:porter-duff",
    "description",
          _("Porter Duff operation over (also known as normal mode, and src-over) (d = cA + cB * (1 - aA))"),
    "cl-source"  , svg_src_over_cl_source,
    NULL);
}
示例#13
0
文件: dst-in.c 项目: GNOME/gegl
static void
gegl_op_class_init (GeglOpClass *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;


  gegl_operation_class_set_keys (operation_class,
    "name"       , "svg:dst-in",
    "compat-name", "gegl:dst-in",
    "title"      , "Dst-in",
    "categories" , "compositors:porter-duff",
    "description",
        _("Porter Duff operation dst-in (d = cB * aA)"),
        NULL);
 

}
示例#14
0
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->compat_name = "gegl:src-in";
  gegl_operation_class_set_keys (operation_class,
  "name"      , "svg:src-in",
  "get_bounding_box" , get_bounding_box,
  "categories", "compositors:porter-duff",
  "description" ,
        _("Porter Duff operation src-in (d = cA * aB)"),
        NULL);
 

}