ImageEn, unit imageenview

TImageEnView.LayersFixRotations

TImageEnView.LayersFixRotations


Declaration


procedure LayersFixRotations(layer: Integer = LYR_ALL_LAYERS);


Description


Rotates the bitmap of a layer to its actual rotation angle. This will improve the quality of the layer.
The index of a specific layer can be specified, or LYR_ALL_LAYERS (-1) to process all layers, or LYR_SELECTED_LAYERS (-2) to process selected layers.
                              
Notes:
- This can be called automatically using loAutoFixRotation of LayerOptions
- The filter used to improve rotation quality is controlled by LayersRotationAntialias and LayersRotationFilter
- This method will also call LayersFixSizes


Example


// Improve rotation of top-most layer
ImageEnView1.LayersFixRotations( ImageEnView1.LayersCount - 1 );

// Improve rotation of all layers
ImageEnView1.LayersFixRotations( LYR_ALL_LAYERS );

// Improve rotation of selected layers
ImageEnView1.LayersFixRotations( LYR_SELECTED_LAYERS );