CrText

CrText — A text canvas item that uses PangoLayout.

Synopsis

                    CrText;
CrItem*             cr_text_new                         (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         const char *text,
                                                         const gchar *first_arg_name,
                                                         ...);

Object Hierarchy

  GObject
   +----CrItem
         +----CrText

Properties

  "anchor"                   GtkAnchorType         : Read / Write
  "fill-color"               gchar*                : Read / Write
  "fill-color-rgba"          guint                 : Read / Write
  "font"                     gchar*                : Read / Write
  "scaleable"                gboolean              : Read / Write
  "text"                     gchar*                : Read / Write
  "use-markup"               gboolean              : Read / Write
  "width"                    gdouble               : Read / Write
  "x-offset"                 gdouble               : Read / Write
  "y-offset"                 gdouble               : Read / Write

Description

This canvas item can render PangoLayout.

Details

CrText

typedef struct _CrText CrText;


cr_text_new ()

CrItem*             cr_text_new                         (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         const char *text,
                                                         const gchar *first_arg_name,
                                                         ...);

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

parent :

The parent canvas item.

x :

X position of the text.

y :

Y position of the text.

text :

The text string.

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 "anchor" property

  "anchor"                   GtkAnchorType         : Read / Write

The part of the text that is referenced to the item's x, y coordinates.

Default value: GTK_ANCHOR_NORTH_WEST


The "fill-color" property

  "fill-color"               gchar*                : Read / Write

A string color such as 'red', or '#123456'.

Default value: NULL


The "fill-color-rgba" property

  "fill-color-rgba"          guint                 : Read / Write

Text color, red,grn,blue,alpha.

Default value: 0


The "font" property

  "font"                     gchar*                : Read / Write

A pango font description string of the form [FAMILY-LIST] [STYLE-OPTIONS] [SIZE].

Default value: NULL


The "scaleable" property

  "scaleable"                gboolean              : Read / Write

When True the size of the text is in item units. When False, the size is in device/pixel units. This effects x/y_offset as well. See also @CrInverse for another way to achieve the same effect.

Default value: TRUE


The "text" property

  "text"                     gchar*                : Read / Write

The text to be drawn.

Default value: NULL


The "use-markup" property

  "use-markup"               gboolean              : Read / Write

If html style markup language should be used.

Default value: FALSE


The "width" property

  "width"                    gdouble               : Read / Write

Width before line-wrap.

Default value: 0


The "x-offset" property

  "x-offset"                 gdouble               : Read / Write

A device offset from the item's anchor position. Only used when scaleable=FALSE.

Default value: 0


The "y-offset" property

  "y-offset"                 gdouble               : Read / Write

A device offset from the item's anchor position. Only used when scaleable=FALSE.

Default value: 0