CtkEffectDropShadow

## CtkEffectDropShadow CtkEffectDropShadow — A drop-shadow effect. |

## Synopsis

    #include <ctk-effect-drop-shadow.h>

    #define             CTK_EFFECT_DROP_SHADOW_MIN_SIZE
    #define             CTK_EFFECT_DROP_SHADOW_MAX_SIZE
    #define             CTK_EFFECT_DROP_SHADOW_DEFAULT_SIZE
    #define             CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_X
    #define             CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_X
    #define             CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_X
    #define             CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_Y
    #define             CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_Y
    #define             CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_Y
                        CtkEffectDropShadowPrivate;
                        CtkEffectDropShadow;
    CtkEffectDropShadow * ctk_effect_drop_shadow_new        (gfloat blurfactor,
                                                             gint offset_x,
                                                             gint offset_y);
    void                ctk_effect_drop_shadow_set_blur_factor
                                                            (CtkEffectDropShadow *drop_shadow,
                                                             gfloat size);
    gfloat              ctk_effect_drop_shadow_get_blur_factor
                                                            (CtkEffectDropShadow *drop_shadow);
    void                ctk_effect_drop_shadow_set_offset_x (CtkEffectDropShadow *drop_shadow,
                                                             gint offset_x);
    gint                ctk_effect_drop_shadow_get_offset_x (CtkEffectDropShadow *drop_shadow);
    void                ctk_effect_drop_shadow_set_offset_y (CtkEffectDropShadow *drop_shadow,
                                                             gint offset_y);
    gint                ctk_effect_drop_shadow_get_offset_y (CtkEffectDropShadow *drop_shadow);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----CtkEffect
                   +----CtkEffectDropShadow

## Properties

      "blur-factor"              gfloat                : Read / Write
      "offset-x"                 gint                  : Read / Write
      "offset-y"                 gint                  : Read / Write

## Description

CtkEffectDropShadow is an implementation of CtkEffect that causes the CtkActor it's attached to, to be drawn with a drop-shadow.

## Details

### CTK_EFFECT_DROP_SHADOW_MIN_SIZE

    #define CTK_EFFECT_DROP_SHADOW_MIN_SIZE           0.1f

### CTK_EFFECT_DROP_SHADOW_MAX_SIZE

    #define CTK_EFFECT_DROP_SHADOW_MAX_SIZE           9.0f

### CTK_EFFECT_DROP_SHADOW_DEFAULT_SIZE

    #define CTK_EFFECT_DROP_SHADOW_DEFAULT_SIZE       2.0f

### CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_X

    #define CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_X     -100

### CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_X

    #define CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_X      100

### CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_X

    #define CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_X    0

### CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_Y

    #define CTK_EFFECT_DROP_SHADOW_MIN_OFFSET_Y     -100

### CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_Y

    #define CTK_EFFECT_DROP_SHADOW_MAX_OFFSET_Y      100

### CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_Y

    #define CTK_EFFECT_DROP_SHADOW_DEFAULT_OFFSET_Y    0

### CtkEffectDropShadowPrivate

    typedef struct _CtkEffectDropShadowPrivate CtkEffectDropShadowPrivate;

### CtkEffectDropShadow

    typedef struct _CtkEffectDropShadow CtkEffectDropShadow;

### ctk_effect_drop_shadow_new ()

    CtkEffectDropShadow * ctk_effect_drop_shadow_new        (gfloat blurfactor,
                                                             gint offset_x,
                                                             gint offset_y);

Create a new CtkEffectDropShadow object with predefined size and offset. The `size` is meant to be understood as blur-kernel radius.

`blurfactor` : |
`offset_x` : | An integer describing the shadows horizontal offset in pixels
`offset_y` : | An integer describing the shadows vertical offset in pixels
Returns : | A new CtkEffectDropShadow

### ctk_effect_drop_shadow_set_blur_factor ()

    void                ctk_effect_drop_shadow_set_blur_factor
                                                            (CtkEffectDropShadow *drop_shadow,
                                                             gfloat size);

`drop_shadow` : |
`size` : |

### ctk_effect_drop_shadow_get_blur_factor ()

    gfloat              ctk_effect_drop_shadow_get_blur_factor
                                                            (CtkEffectDropShadow *drop_shadow);

`drop_shadow` : |
Returns : |

### ctk_effect_drop_shadow_set_offset_x ()

    void                ctk_effect_drop_shadow_set_offset_x (CtkEffectDropShadow *drop_shadow,
                                                             gint offset_x);

Set the horizontal offset (in pixels) for `drop_shadow`.

`drop_shadow` : | A pointer to a CtkEffectDropShadow object
`offset_x` : | An integer describing the shadows horizontal offset in pixels

### ctk_effect_drop_shadow_get_offset_x ()

    gint                ctk_effect_drop_shadow_get_offset_x (CtkEffectDropShadow *drop_shadow);

Obtain the horizontal offset (in pixels) used for `drop_shadow`.

`drop_shadow` : | A pointer to a CtkEffectDropShadow object
Returns : | An integer describing the shadows horizontal offset in pixels. Should an invalid or NULL pointer be passed as `drop_shadow`, 0 is returned to the caller.

### ctk_effect_drop_shadow_set_offset_y ()

    void                ctk_effect_drop_shadow_set_offset_y (CtkEffectDropShadow *drop_shadow,
                                                             gint offset_y);

Set the vertical offset (in pixels) for `drop_shadow`.

`drop_shadow` : | A pointer to a CtkEffectDropShadow object
`offset_y` : | An integer describing the shadows vertical offset in pixels

### ctk_effect_drop_shadow_get_offset_y ()

    gint                ctk_effect_drop_shadow_get_offset_y (CtkEffectDropShadow *drop_shadow);

Obtain the vertical offset (in pixels) used for `drop_shadow`.

`drop_shadow` : | A pointer to a CtkEffectDropShadow object
Returns : | An integer describing the shadows vertical offset in pixels. Should an invalid or NULL pointer be passed as `drop_shadow`, 0 is returned to the caller.

## Property Details

### The `"blur-factor"` property

      "blur-factor"              gfloat                : Read / Write

Size/radius of drop-shadow in pixels.

Allowed values: [0.1,9]

Default value: 2

### The `"offset-x"` property

      "offset-x"                 gint                  : Read / Write

Horizontal offset of drop-shadow in pixels.

Allowed values: [-100,100]

Default value: 0

### The `"offset-y"` property

      "offset-y"                 gint                  : Read / Write

Vertical offset of drop-shadow in pixels.

Allowed values: [-100,100]

Default value: 0