LayerShaderLayer Class Reference

#include <lib_layershader.h>

Detailed Description

Represents a layer in a LayerShader.

Public Member Functions

LayerShaderLayerGetNext ()
 
LayerType GetType ()
 
String GetName (BaseDocument *doc)
 
BaseBitmapGetPreview ()
 
Bool GetParameter (Int32 id, GeData &d) const
 
Bool SetParameter (Int32 id, const GeData &d)
 

Private Member Functions

 LayerShaderLayer ()
 
 ~LayerShaderLayer ()
 

Constructor & Destructor Documentation

◆ LayerShaderLayer()

LayerShaderLayer ( )
private

◆ ~LayerShaderLayer()

~LayerShaderLayer ( )
private

Member Function Documentation

◆ GetNext()

LayerShaderLayer* GetNext ( )

Gets the next layer.

Note
Use this to navigate trough the layers of a layer shader.
Returns
The next layer. The layer shader owns the pointed layer.

◆ GetType()

LayerType GetType ( )

Gets the layer type.

Returns
The layer type: LayerType

◆ GetName()

String GetName ( BaseDocument doc)

Retrieves the name of the layer.

Parameters
[in]docThe document for the operation. The caller owns the pointed documented.
Returns
The layer name.

◆ GetPreview()

BaseBitmap* GetPreview ( )

Retrieves the preview bitmap.

Returns
The preview bitmap. The layer shader owns the pointed bitmap.

◆ GetParameter()

Bool GetParameter ( Int32  id,
GeData d 
) const

Retrieves layer parameters.

Parameters
[in]idThe ID of the parameter to get:
For all layers: LAYER_S_PARAM_ALL
For folders (TypeFolder): LAYER_S_PARAM_FOLDER
For shaders (TypeShader): LAYER_S_PARAM_SHADER
For brightness/contrast layers (TypeBrightnessContrast): LAYER_S_PARAM_BC
For HSL layers (TypeHSL): LAYER_S_PARAM_HSL
For posterize layers (TypePosterize): LAYER_S_PARAM_POSTER
For colorize layers (TypeColorize): LAYER_S_PARAM_COLORIZE
For clamp layers (TypeClamp): LAYER_S_PARAM_CLAMP
For clip layers (TypeClip): LAYER_S_PARAM_CLIP
For distorter layers (TypeDistorter): LAYER_S_PARAM_DISTORT
For transform layers (TypeTransform): LAYER_S_PARAM_TRANS
.
[out]dFilled with the parameter value.
Returns
true if the parameter could be retrieved, otherwise false.

◆ SetParameter()

Bool SetParameter ( Int32  id,
const GeData d 
)

Sets layer parameters.

Parameters
[in]idThe ID of the parameter to set:
For all layers: LAYER_S_PARAM_ALL
For folders (TypeFolder): LAYER_S_PARAM_FOLDER
For shaders (TypeShader): LAYER_S_PARAM_SHADER
For brightness/contrast layers (TypeBrightnessContrast): LAYER_S_PARAM_BC
For HSL layers (TypeHSL): LAYER_S_PARAM_HSL
For posterize layers (TypePosterize): LAYER_S_PARAM_POSTER
For colorize layers (TypeColorize): LAYER_S_PARAM_COLORIZE
For clamp layers (TypeClamp): LAYER_S_PARAM_CLAMP
For clip layers (TypeClip): LAYER_S_PARAM_CLIP
For distorter layers (TypeDistorter): LAYER_S_PARAM_DISTORT
For transform layers (TypeTransform): LAYER_S_PARAM_TRANS
.
[in]dThe new parameter value.
Returns
true if the parameter could be set, otherwise false.