CrRectangle

CrRectangle — A simple rectangle canvas item.

Synopsis

                    CrRectangle;
CrItem*             cr_rectangle_new                    (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         double width,
                                                         double height,
                                                         const gchar *first_arg_name,
                                                         ...);

Object Hierarchy

  GObject
   +----CrItem
         +----CrPath
               +----CrRectangle

Properties

  "height"                   gdouble               : Read / Write
  "width"                    gdouble               : Read / Write

Description

This is a simple rectangle path. Note: that the "x" and "y" coordinates refer to the center of the rectangle and the "width" and "height" properties are taken half to either side of the x, y position.

Details

CrRectangle

typedef struct _CrRectangle CrRectangle;


cr_rectangle_new ()

CrItem*             cr_rectangle_new                    (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         double width,
                                                         double height,
                                                         const gchar *first_arg_name,
                                                         ...);

A convenience constructor for creating a rectangle and adding it to an item group in one step.

parent :

The parent canvas item.

x :

Center X coordinate in item units

y :

Center Y coordinate in item units

width :

Width in item units.

height :

Height in item units.

first_arg_name :

... :

Returns :

A reference to a new CrItem. You must call g_object_ref if you intend to use this reference outside the local scope.

Property Details

The "height" property

  "height"                   gdouble               : Read / Write

Height of rectangle in item units. Note this is half above #CrItem:y and half below #CrItem:y.

Default value: 2


The "width" property

  "width"                    gdouble               : Read / Write

Width of rectangle in item units. Note this is half to the left of #CrItem:x and half to the right of #CrItem:x.

Default value: 2