CrInverse

CrInverse — An item group that reverses a transformation higher up in the item tree.

Synopsis

                    CrInverse;
CrItem*             cr_inverse_new                      (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         const gchar *first_arg_name,
                                                         ...);

Object Hierarchy

  GObject
   +----CrItem
         +----CrInverse

Properties

  "preserve-rotation"        gboolean              : Read / Write
  "preserve-scale"           gboolean              : Read / Write

Description

This group can be used to reverse the cumulative scale and rotational effects of all affine transformations higher than it in the item tree. It will always anchor the group to the x and y property settings according to the current transformation matrix. Once the anchor is established, it will then optionally reverse the effects of scaling, rotation, or both.

The typical use case for CrInverse is for annotating a feature on a plot or diagram. As the feature is scaled or rotated, the annotation stays at the same scale and or rotation. Another way to produce this same effect is to use the 'scaleable' properties on CrText, CrVector, and CrPixbuf.

Warning this item will not function properly when implemented concurrently on multiple views unless transformations formed above it are the same in each view.

Details

CrInverse

typedef struct _CrInverse CrInverse;


cr_inverse_new ()

CrItem*             cr_inverse_new                      (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         const gchar *first_arg_name,
                                                         ...);

A convenience constructor for creating an inverse group and adding it to an item group in one step. The X and Y coordinates will mark the anchor point in the item space of the parent group.

parent :

The parent canvas item.

x :

X position of the group.

y :

Y position of the group.

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 "preserve-rotation" property

  "preserve-rotation"        gboolean              : Read / Write

The rotation from the parent is not altered.

Default value: FALSE


The "preserve-scale" property

  "preserve-scale"           gboolean              : Read / Write

The scaling from the parent is not altered.

Default value: FALSE