setAspectRatio()

Displays an fglgallery to the end user.

Syntax

setAspectRatio(
   id SMALLINT,
   ratio DECIMAL(5,2) )
  1. id is the gallery identifier, as returned by the create() function.
  2. ratio is the aspect ratio to be used (for example, 1.77 or 16/9).

Usage

In order to align image elements properly when image resources have different sizes, the fglgallery uses the same size for each image.

Note: The size of image elements is defined by the FGLGALLERY_SIZE_* parameter passed to the display() function. This size parameter is relative to the current font size (em unit is used in HTML).

The setAspectRatio() function defines the aspect ratio for fglgallery image elements.

By default, a square aspect ration (1:1) is used.

The id parameter is the fglgallery handler returned by the create() function.

The display() function has to used after setAspectRatio() to have the changes in the fglgallery take effect.

Example

CALL fglgallery.setAspectRatio( id, 16/9 )