ClutterRectangle: Clutter Reference Manual

## ClutterRectangle ClutterRectangle — An actor that displays a simple rectangle. |

## Functions

ClutterActor * | clutter_rectangle_new ()
ClutterActor * | clutter_rectangle_new_with_color ()
void | clutter_rectangle_get_color ()
void | clutter_rectangle_set_color ()
void | clutter_rectangle_get_border_color ()
void | clutter_rectangle_set_border_color ()
guint | clutter_rectangle_get_border_width ()
void | clutter_rectangle_set_border_width ()

## Properties

ClutterColor * | border-color | Read / Write
guint | border-width | Read / Write
ClutterColor * | color | Read / Write
gboolean | has-border | Read / Write

## Types and Values

struct | ClutterRectangle
struct | ClutterRectangleClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── ClutterRectangle

## Implemented Interfaces

ClutterRectangle implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Description

ClutterRectangle is a ClutterActor which draws a simple filled rectangle.

ClutterRectangle is deprecated since Clutter 1.10. If you want an actor painting a solid color, you can replace it with ClutterActor and set the “background-color” property to the desired ClutterColor. If you are drawing more complex shapes, use ClutterCanvas to draw using the Cairo 2D API instead.

## Functions

### clutter_rectangle_new ()

    ClutterActor *
    clutter_rectangle_new (void);

`clutter_rectangle_new` has been deprecated since version 1.10 and should not be used in newly-written code.

Use `clutter_actor_new()` instead

Creates a new ClutterActor with a rectangular shape.

#### Returns

a new ClutterRectangle

### clutter_rectangle_new_with_color ()

    ClutterActor *
    clutter_rectangle_new_with_color (const ClutterColor *color);

`clutter_rectangle_new_with_color` has been deprecated since version 1.10 and should not be used in newly-written code.

Use `clutter_actor_new()` and `clutter_actor_set_background_color()` instead

Creates a new ClutterActor with a rectangular shape and of the given `color` .

#### Parameters

color | a ClutterColor |

#### Returns

a new ClutterRectangle

### clutter_rectangle_get_color ()

    void
    clutter_rectangle_get_color (ClutterRectangle *rectangle,
                                 ClutterColor *color);

`clutter_rectangle_get_color` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and `clutter_actor_get_background_color()` instead

Retrieves the color of `rectangle` .

#### Parameters

rectangle | a ClutterRectangle |
color | return location for a ClutterColor. | [out caller-allocates]

### clutter_rectangle_set_color ()

    void
    clutter_rectangle_set_color (ClutterRectangle *rectangle,
                                 const ClutterColor *color);

`clutter_rectangle_set_color` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and `clutter_actor_set_background_color()` instead

Sets the color of `rectangle` .

#### Parameters

rectangle | a ClutterRectangle |
color | a ClutterColor |

### clutter_rectangle_get_border_color ()

    void
    clutter_rectangle_get_border_color (ClutterRectangle *rectangle,
                                        ClutterColor *color);

`clutter_rectangle_get_border_color` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and a ClutterCanvas to draw the border with Cairo

Gets the color of the border used by `rectangle` and places it into `color` .

#### Parameters

rectangle | a ClutterRectangle |
color | return location for a ClutterColor. | [out caller-allocates]

Since: 0.2

### clutter_rectangle_set_border_color ()

    void
    clutter_rectangle_set_border_color (ClutterRectangle *rectangle,
                                        const ClutterColor *color);

`clutter_rectangle_set_border_color` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and a ClutterCanvas to draw the border with Cairo

Sets the color of the border used by `rectangle` using `color`

#### Parameters

rectangle | a ClutterRectangle |
color | the color of the border |

### clutter_rectangle_get_border_width ()

    guint
    clutter_rectangle_get_border_width (ClutterRectangle *rectangle);

`clutter_rectangle_get_border_width` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and a ClutterCanvas content to draw the border using Cairo

Gets the width (in pixels) of the border used by `rectangle`

#### Parameters

rectangle | a ClutterRectangle |

#### Returns

the border's width

Since: 0.2

### clutter_rectangle_set_border_width ()

    void
    clutter_rectangle_set_border_width (ClutterRectangle *rectangle,
                                        guint width);

`clutter_rectangle_set_border_width` has been deprecated since version 1.10 and should not be used in newly-written code.

Use ClutterActor and a ClutterCanvas content to draw the border using Cairo

Sets the width (in pixel) of the border used by `rectangle` . A `width` of 0 will unset the border.

#### Parameters

rectangle | a ClutterRectangle |
width | the width of the border |

Since: 0.2

## Types and Values

### struct ClutterRectangle

    struct ClutterRectangle;

The ClutterRectangle structure contains only private data and should be accessed using the provided API

Since: 0.2

### struct ClutterRectangleClass

    struct ClutterRectangleClass {
    };

The ClutterRectangleClass structure contains only private data

Since: 0.2

## Property Details

### The `“border-color”` property

      “border-color”             ClutterColor *

The color of the border of the rectangle.

Flags: Read / Write

Since: 0.2

### The `“border-width”` property

      “border-width”             guint

The width of the border of the rectangle, in pixels.

Flags: Read / Write

Default value: 0

Since: 0.2

### The `“color”` property

      “color”                    ClutterColor *

The color of the rectangle.

Flags: Read / Write

### The `“has-border”` property

      “has-border”               gboolean

Whether the ClutterRectangle should be displayed with a border.

Flags: Read / Write

Default value: FALSE

Since: 0.2