Blender V4.3
COM_SetColorOperation.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8
9namespace blender::compositor {
10
16 private:
17 float color_[4];
18
19 public:
24
25 const float *get_constant_elem() override
26 {
27 return color_;
28 }
29
31 {
32 return color_[0];
33 }
34 void set_channel1(float value)
35 {
36 color_[0] = value;
37 }
39 {
40 return color_[1];
41 }
42 void set_channel2(float value)
43 {
44 color_[1] = value;
45 }
47 {
48 return color_[2];
49 }
50 void set_channel3(float value)
51 {
52 color_[2] = value;
53 }
55 {
56 return color_[3];
57 }
58 void set_channel4(const float value)
59 {
60 color_[3] = value;
61 }
62 void set_channels(const float value[4])
63 {
64 copy_v4_v4(color_, value);
65 }
66
67 void determine_canvas(const rcti &preferred_area, rcti &r_area) override;
68};
69
70} // namespace blender::compositor
MINLINE void copy_v4_v4(float r[4], const float a[4])
void determine_canvas(const rcti &preferred_area, rcti &r_area) override