8000 Add rgb_color methods · coolcoder613eb/Haiku-PyAPI@9e3315c · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e3315c

Browse files
Add rgb_color methods
1 parent 118f940 commit 9e3315c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bindings/interface/GraphicsDefs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ py::class_<rgb_color>(m, "rgb_color")
166166
.def(py::init<>(), "")
167167
.def("set_to", &rgb_color::set_to, "", py::arg("r"), py::arg("g"), py::arg("b"), py::arg("a")=255)
168168
.def("Brightness", &rgb_color::Brightness, "")
169+
.def("IsDark", &rgb_color::IsDark, "")
170+
.def("IsLight", &rgb_color::IsLight, "")
169171
.def("__eq__", &rgb_color::operator==, "", py::arg("other"))
170172
.def("__ne__", &rgb_color::operator!=, "", py::arg("other"))
171173
.def("operator=", &rgb_color::operator=, "", py::arg("other"))

0 commit comments

Comments
 (0)
0