GimpImage-arrange

GimpImage-arrange

Synopsis

void                gimp_image_arrange_objects          (GimpImage *image,
                                                         GList *list,
                                                         GimpAlignmentType alignment,
                                                         GObject *reference,
                                                         GimpAlignmentType reference_alignment,
                                                         gint offset);

Description

Details

gimp_image_arrange_objects ()

void                gimp_image_arrange_objects          (GimpImage *image,
                                                         GList *list,
                                                         GimpAlignmentType alignment,
                                                         GObject *reference,
                                                         GimpAlignmentType reference_alignment,
                                                         gint offset);

This function shifts the positions of a set of target objects, which can be "items" or guides, to bring them into a specified type of alignment with a reference object, which can be an item, guide, or image. If the requested alignment does not make sense (i.e., trying to align a vertical guide vertically), nothing happens and no error message is generated.

The objects in the list are sorted into increasing order before being arranged, where the order is defined by the type of alignment being requested. If the reference argument is NULL, then the first object in the sorted list is used as reference.

When there are multiple target objects, they are arranged so that the spacing between consecutive ones is given by the argument offset.

image :

The GimpImage to which the objects belong.

list :

A GList of objects to be aligned.

alignment :

The point on each target object to bring into alignment.

reference :

The GObject to align the targets with, or NULL.

reference_alignment :

The point on the reference object to align the target item with..

offset :

How much to shift the target from perfect alignment..