align


Description:

public bool align (Rectangle rectangle, Rectangle tile, RectangleAlignment alignment)

Aligns rectangle to a regular tile grid, of which tile is a representative tile, and stores the result in this.

alignment can be one of:

GEGL_RECTANGLE_ALIGNMENT_SUBSET: Calculate the biggest aligned rectangle contained in rectangle.

GEGL_RECTANGLE_ALIGNMENT_SUPERSET: Calculate the smallest aligned rectangle containing rectangle.

GEGL_RECTANGLE_ALIGNMENT_NEAREST: Calculate the nearest aligned rectangle to rectangle.

this may point to the same object as rectangle or tile.

Returns TRUE if the result is not empty.

Parameters:

this

a Rectangle

rectangle

a Rectangle

tile

a Rectangle

alignment

a RectangleAlignment value