#include "common.h"
void initSize(py::module &m) {
// ISize
py::class_(m, "ISize")
.def(py::init(&SkISize::MakeEmpty))
.def(py::init(&SkISize::Make), py::arg("width"), py::arg("height"))
.def(py::init(
[] (py::tuple t) {
if (t.size() != 2)
throw py::value_error("ISize must have exactly two elements.");
return SkISize::Make(t[0].cast(), t[1].cast());
}),
py::arg("t"))
.def("set", &SkISize::set, py::arg("width"), py::arg("height"))
.def("isZero", &SkISize::isZero,
R"docstring(
Returns true iff fWidth == 0 && fHeight == 0.
)docstring")
.def("isEmpty", &SkISize::isEmpty,
"Returns true if either width or height are