GroupLayer Structure#
Equivalent of Photoshops Group Layer
-
template<typename T>
struct GroupLayer : public Layer<T># Represents a group of layers that may contain nested child layers.
- Template Parameters:
T – The data type for pixel values in layers (e.g., uint8_t, uint16_t, float32_t).
Public Functions
-
inline GroupLayer(Layer<T>::Params ¶meters, bool isCollapsed = false)#
Constructs a GroupLayer with the given layer parameters and collapse state.
- Parameters:
layerParameters – The parameters for the group layer.
isCollapsed – Specifies whether the group layer is initially collapsed.
Adds a layer to the group, checking for duplicates in the process.
- Parameters:
layeredFile – The layered file containing the group.
layer – The layer to be added.
-
inline void removeLayer(const int index)#
Removes a layer at the given index from the group.
- Parameters:
index – The index of the layer to be removed.
Removes the specified layer from the group.
- Parameters:
layer – The layer to be removed.
-
inline void removeLayer(const std::string layerName)#
Removes the specified layer from the group.
- Parameters:
layerName – The name of the layer to be removed
-
inline std::tuple<LayerRecord, ChannelImageData> toPhotoshop(const Enum::ColorMode colorMode, const FileHeader &header) override#
Converts the group layer to Photoshop layerRecords and imageData.
- Parameters:
colorMode – The color mode for the conversion.
header – The file header for the conversion.
- Returns:
A tuple containing layerRecords and imageData.
-
inline GroupLayer(const LayerRecord &layerRecord, ChannelImageData &channelImageData, const FileHeader &header)#
Constructs a GroupLayer using layerRecord, channelImageData, and file header.
- Parameters:
layerRecord – The layer record for the group layer.
channelImageData – The channel image data for the group layer.
header – The file header for the group layer.