From 74a37c6266ea163d2c23c26a85f8fbc789acb249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Fri, 23 Jul 2010 21:39:49 +0200 Subject: [PATCH] gimpoperationcoefcalc: get_bounding_box now return the bounding box of the cage --- app/gegl/gimpoperationcagecoefcalc.c | 36 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/app/gegl/gimpoperationcagecoefcalc.c b/app/gegl/gimpoperationcagecoefcalc.c index 3b9059fa7c..302a12d9c8 100644 --- a/app/gegl/gimpoperationcagecoefcalc.c +++ b/app/gegl/gimpoperationcagecoefcalc.c @@ -29,19 +29,20 @@ #include "gimpcageconfig.h" -static void gimp_operation_cage_coef_calc_prepare (GeglOperation *operation); -static void gimp_operation_cage_coef_calc_finalize (GObject *object); -static void gimp_operation_cage_coef_calc_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec); -static void gimp_operation_cage_coef_calc_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec); -static gboolean gimp_operation_cage_coef_calc_process (GeglOperation *operation, - GeglBuffer *output, - const GeglRectangle *roi); +static void gimp_operation_cage_coef_calc_prepare (GeglOperation *operation); +static void gimp_operation_cage_coef_calc_finalize (GObject *object); +static void gimp_operation_cage_coef_calc_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +static void gimp_operation_cage_coef_calc_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); +static GeglRectangle gimp_operation_cage_coef_calc_get_bounding_box (GeglOperation *operation); +static gboolean gimp_operation_cage_coef_calc_process (GeglOperation *operation, + GeglBuffer *output, + const GeglRectangle *roi); G_DEFINE_TYPE (GimpOperationCageCoefCalc, gimp_operation_cage_coef_calc, @@ -63,6 +64,7 @@ gimp_operation_cage_coef_calc_class_init (GimpOperationCageCoefCalcClass *klass) operation_class->description = "GIMP cage transform"; operation_class->prepare = gimp_operation_cage_coef_calc_prepare; + operation_class->get_bounding_box = gimp_operation_cage_coef_calc_get_bounding_box; operation_class->no_cache = FALSE; operation_class->get_cached_region = NULL; @@ -151,6 +153,14 @@ gimp_operation_cage_coef_calc_set_property (GObject *object, } } +static GeglRectangle +gimp_operation_cage_coef_calc_get_bounding_box (GeglOperation *operation) +{ + GimpOperationCageCoefCalc *occc = GIMP_OPERATION_CAGE_COEF_CALC (operation); + GimpCageConfig *config = GIMP_CAGE_CONFIG (occc->config); + + return gimp_cage_config_get_bounding_box (config); +} static gboolean gimp_operation_cage_coef_calc_process (GeglOperation *operation,