BlendLayer Class Referenceabstract

#include <blendlayers.h>

Inheritance diagram for BlendLayer:

Public Member Functions

virtual ~BlendLayer ()
 
virtual String GetLayerName (BaseDocument *pDoc, Bool bReset=false)=0
 
virtual Bool CopyTo (BlendLayer *pDest, AliasTrans *pTrans)=0
 
virtual Bool Read (HyperFile *pFile, Int32 lLevel)=0
 
virtual Bool Write (HyperFile *pFile) const =0
 
virtual Int32 Compare (BlendLayer *pLayer)
 
virtual Bool CompareStructure (BlendLayer *pLayer, Bool bCompareNames)
 
virtual void GetParameter (Int32 lItem, const DescID &id, GeData &t_data, Int32 &flags)
 
virtual void SetParameter (Int32 lItem, const DescID &id, const GeData &t_data, Int32 &flags)
 
virtual void ClearShaders (BaseList2D *pParent, BaseDocument *pDoc)
 
Bool IsFolder ()
 
Bool IsShader ()
 
virtual Bool GetParameter (Int32 lID, GeData &d)
 
virtual Bool SetParameter (Int32 lID, const GeData &d)
 
LayerShaderLayerGetNext ()
 
Bool GetParameter_ (Int32 lID, GeData &d)
 
Bool SetParameter_ (Int32 lID, const GeData &d)
 
String GetName (BaseDocument *pDoc)
 
LayerType GetType ()
 

Static Public Member Functions

static void Free (BlendLayer *&pLayer)
 

Public Attributes

CBlendLayersm_pParent
 
String m_strName
 
LayerType m_LayerType
 
Bool m_bDirty
 
Bool m_bIsSelected
 
Bool m_bIsActive
 
Int32 m_lLayerID
 
Int32 m_lFlags
 
Int32 m_lRenderFlags
 
BaseBitmapm_pAlphaChannel
 

Protected Member Functions

 BlendLayer ()
 
Bool CopyBasics (BlendLayer *pDest)
 

Static Protected Member Functions

static Bool AllocDefaults (BlendLayer *pLayer)
 

Detailed Description

Base class of the different Layer shader layers. See LayerShaderLayer.

Constructor & Destructor Documentation

◆ ~BlendLayer()

virtual ~BlendLayer ( )
virtual

Default destructor.

◆ BlendLayer()

BlendLayer ( )
protected

Default constructor.

Member Function Documentation

◆ Free()

static void Free ( BlendLayer *&  pLayer)
static

Destructs layers allocated with Alloc().

Parameters
[in]pLayerThe layer to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ GetLayerName()

◆ CopyTo()

virtual Bool CopyTo ( BlendLayer pDest,
AliasTrans pTrans 
)
pure virtual

Copies all values from the layer to pDest.

Parameters
[in]pDestThe destination layer. The caller owns the pointed layer.
[in]pTransAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias translator.
Returns
true if the layer was copied, otherwise false.

Implemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, and BlendFolder.

◆ Read()

virtual Bool Read ( HyperFile pFile,
Int32  lLevel 
)
pure virtual

Reads the layer from a hyper file.

Parameters
[in]pFileThe hyper file to read from. The caller owns the pointed hyper file.
[in]lLevelThe disklevel of the layer to read.
Returns
true if the layer was read, otherwise false.

Implemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, and BlendFolder.

◆ Write()

virtual Bool Write ( HyperFile pFile) const
pure virtual

Writes the layer to a hyper file.

Parameters
[in]pFileThe hyper file to write to. The caller owns the pointed hyper file.
Returns
true if the layer was written, otherwise false.

Implemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, and BlendFolder.

◆ Compare()

virtual Int32 Compare ( BlendLayer pLayer)
virtual

Compares two layers.

Parameters
[in]pLayerThe layer to compare with. The caller owns the pointed layer.
Returns
0 if the layers are identical, otherwise 1.

Reimplemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, and BlendFolder.

◆ CompareStructure()

virtual Bool CompareStructure ( BlendLayer pLayer,
Bool  bCompareNames 
)
virtual

Private.

Reimplemented in BlendEffectColorize, BlendFolder, and BlendShader.

◆ GetParameter() [1/2]

virtual void GetParameter ( Int32  lItem,
const DescID id,
GeData t_data,
Int32 flags 
)
virtual

◆ SetParameter() [1/2]

virtual void SetParameter ( Int32  lItem,
const DescID id,
const GeData t_data,
Int32 flags 
)
virtual

◆ ClearShaders()

virtual void ClearShaders ( BaseList2D pParent,
BaseDocument pDoc 
)
virtual

Private.

Reimplemented in BlendShader, and BlendFolder.

◆ IsFolder()

Bool IsFolder ( )

Checks if the layer is a folder layer.

Returns
true if it is a folder layer, otherwise false.

◆ IsShader()

Bool IsShader ( )

Checks if the layer is a shader layer.

Returns
true if it is a shader layer, otherwise false.

◆ GetParameter() [2/2]

virtual Bool GetParameter ( Int32  lID,
GeData d 
)
virtual

Gets layer parameters.

Parameters
[in]lIDThe layer parameter ID. For all layers: LAYER_S_PARAM_ALL
[in]dFilled with the layer parameter value.
Returns
true if the parameter could be retrieved, otherwise false.

Reimplemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, BlendFolder, and LayerShaderLayer.

◆ SetParameter() [2/2]

virtual Bool SetParameter ( Int32  lID,
const GeData d 
)
virtual

Sets layer parameters.

Parameters
[in]lIDThe layer parameter ID. For all layers: LAYER_S_PARAM_ALL
[in]dThe layer parameter value.
Returns
true if the parameter could be set, otherwise false.

Reimplemented in BlendEffectDistorter, BlendEffectTransform, BlendEffectClip, BlendEffectClamp, BlendEffectColorize, BlendEffectPosterize, BlendEffectHSL, BlendEffectBC, BlendShader, BlendFolder, and LayerShaderLayer.

◆ GetNext()

LayerShaderLayer* GetNext ( )

Gets the next Layer shader layer.

Returns
The next Layer shader layer. The Layer shader owns the pointed layer.

◆ GetParameter_()

Bool GetParameter_ ( Int32  lID,
GeData d 
)
See also
GetParameter()

◆ SetParameter_()

Bool SetParameter_ ( Int32  lID,
const GeData d 
)
See also
SetParameter()

◆ GetName()

String GetName ( BaseDocument pDoc)

Gets the name of the layer.

Parameters
[in]pDocThe document where the layer resides. The caller owns the pointed document.
Returns
The name of the layer.

◆ GetType()

LayerType GetType ( )

Gets the layer type.

Returns
The layer type.

◆ CopyBasics()

Bool CopyBasics ( BlendLayer pDest)
protected

Private.

◆ AllocDefaults()

static Bool AllocDefaults ( BlendLayer pLayer)
staticprotected

Private.

Member Data Documentation

◆ m_pParent

CBlendLayers* m_pParent

Private.

◆ m_strName

String m_strName

Private.

◆ m_LayerType

LayerType m_LayerType

Private.

◆ m_bDirty

Bool m_bDirty

Private.

◆ m_bIsSelected

Bool m_bIsSelected

Private.

◆ m_bIsActive

Bool m_bIsActive

Private.

◆ m_lLayerID

Int32 m_lLayerID

Private.

◆ m_lFlags

Int32 m_lFlags

Private.

◆ m_lRenderFlags

Int32 m_lRenderFlags

Private.

◆ m_pAlphaChannel

BaseBitmap* m_pAlphaChannel

Private.