Clutter.Canvas.set_size

### Method

# Clutter Canvasset_size

#### Declaration [src]

    gboolean
    clutter_canvas_set_size (
      ClutterCanvas* canvas,
      int width,
      int height
    )

#### Description [src]

Sets the size of the `canvas`, and invalidates the content.

This function will cause the `canvas` to be invalidated only if the size of the canvas surface has changed.

If you want to invalidate the contents of the `canvas` when setting the size, you can use the return value of the function to conditionally call clutter_content_invalidate():

      if (!clutter_canvas_set_size (canvas, width, height))
        clutter_content_invalidate (CLUTTER_CONTENT (canvas));

#### Parameters

`width`

  Type: `int`

  The width of the canvas, in pixels.

`height`

  Type: `int`

  The height of the canvas, in pixels.

#### Return value

Type: `gboolean`

This function returns `TRUE` if the size change caused a content invalidation, and `FALSE` otherwise.