Krita Source Code Documentation
Loading...
Searching...
No Matches
gmic.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2017 Boudewijn Rempt <boud@valdyas.org>
3
* SPDX-FileCopyrightText: 2020-2021 L. E. Segovia <amy@amyspark.me>
4
*
5
* SPDX-License-Identifier: LGPL-2.0-or-later
6
*/
7
8
#ifndef GMIC_H
9
#define GMIC_H
10
11
#include <QString>
12
18
enum class
OutputMode
{
InPlace
,
NewLayers
,
NewActiveLayers
,
NewImage
,
Unspecified
= 100 };
19
20
// this enum is also index in LAYER_MODE_STRINGS list
21
enum class
InputLayerMode
{
22
NoInput
,
23
Active
,
24
All
,
25
ActiveAndBelow
,
26
ActiveAndAbove
,
27
AllVisible
,
28
AllInvisible
,
29
AllVisiblesDesc_DEPRECATED
,
/* Removed since 2.8.2 */
30
AllInvisiblesDesc_DEPRECATED
,
/* Removed since 2.8.2 */
31
AllDesc_DEPRECATED
,
/* Removed since 2.8.2 */
32
Unspecified
= 100
33
};
34
35
template
<
typename
T>
36
struct
gmic_image
{
37
unsigned
int
_width
{0};
// Number of image columns (dimension along the X-axis).
38
unsigned
int
_height
{0};
// Number of image lines (dimension along the Y-axis)
39
unsigned
int
_depth
{1};
// Number of image slices (dimension along the Z-axis).
40
unsigned
int
_spectrum
{3};
// Number of image channels (dimension along the C-axis).
41
bool
_is_shared
{
false
};
// Tells if the data buffer is shared by another structure.
42
T *
_data
{
nullptr
};
// Pointer to the first pixel value.
43
QString
name
{};
// Layer name
44
45
// Destructor.
46
~gmic_image
()
47
{
48
if
(!
_is_shared
)
49
delete
[]
_data
;
50
}
51
52
void
assign
(
unsigned
int
w,
unsigned
int
h,
unsigned
int
d,
unsigned
int
s)
53
{
54
_width
= w;
55
_height
= h;
56
_depth
= d;
57
_spectrum
= s;
58
}
59
};
60
61
#endif
// GMIC_H
InputLayerMode
InputLayerMode
Definition
gmic.h:21
InputLayerMode::ActiveAndBelow
@ ActiveAndBelow
InputLayerMode::AllVisible
@ AllVisible
InputLayerMode::Active
@ Active
InputLayerMode::AllInvisiblesDesc_DEPRECATED
@ AllInvisiblesDesc_DEPRECATED
InputLayerMode::AllDesc_DEPRECATED
@ AllDesc_DEPRECATED
InputLayerMode::All
@ All
InputLayerMode::AllVisiblesDesc_DEPRECATED
@ AllVisiblesDesc_DEPRECATED
InputLayerMode::ActiveAndAbove
@ ActiveAndAbove
InputLayerMode::NoInput
@ NoInput
InputLayerMode::AllInvisible
@ AllInvisible
OutputMode
OutputMode
Definition
gmic.h:18
OutputMode::NewLayers
@ NewLayers
OutputMode::InPlace
@ InPlace
OutputMode::NewImage
@ NewImage
OutputMode::Unspecified
@ Unspecified
OutputMode::NewActiveLayers
@ NewActiveLayers
gmic_image
Definition
gmic.h:36
gmic_image::_depth
unsigned int _depth
Definition
gmic.h:39
gmic_image::_height
unsigned int _height
Definition
gmic.h:38
gmic_image::_data
T * _data
Definition
gmic.h:42
gmic_image::assign
void assign(unsigned int w, unsigned int h, unsigned int d, unsigned int s)
Definition
gmic.h:52
gmic_image::name
QString name
Definition
gmic.h:43
gmic_image::_spectrum
unsigned int _spectrum
Definition
gmic.h:40
gmic_image::~gmic_image
~gmic_image()
Definition
gmic.h:46
gmic_image::_is_shared
bool _is_shared
Definition
gmic.h:41
gmic_image::_width
unsigned int _width
Definition
gmic.h:37
plugins
extensions
qmic
gmic.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52