aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/matplotlib/py3/src/py_converters.h
diff options
context:
space:
mode:
authorzverevgeny <zverevgeny@yandex-team.com>2025-05-13 19:00:02 +0300
committerzverevgeny <zverevgeny@yandex-team.com>2025-05-13 19:13:54 +0300
commit92e06374736aa28637dc0e706455b65c8268a5e6 (patch)
tree3df370c199ae25d308e542f02af20f43eab78f8a /contrib/python/matplotlib/py3/src/py_converters.h
parentdc63d5794da99c2ebe3f32914d0351d9707660b0 (diff)
downloadydb-92e06374736aa28637dc0e706455b65c8268a5e6.tar.gz
Import matplotlib
commit_hash:d59c2338025ef8fd1e1f961ed9d8d5fd52d0bd96
Diffstat (limited to 'contrib/python/matplotlib/py3/src/py_converters.h')
-rw-r--r--contrib/python/matplotlib/py3/src/py_converters.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/python/matplotlib/py3/src/py_converters.h b/contrib/python/matplotlib/py3/src/py_converters.h
new file mode 100644
index 00000000000..2c9dc6d1b86
--- /dev/null
+++ b/contrib/python/matplotlib/py3/src/py_converters.h
@@ -0,0 +1,48 @@
+/* -*- mode: c++; c-basic-offset: 4 -*- */
+
+#ifndef MPL_PY_CONVERTERS_H
+#define MPL_PY_CONVERTERS_H
+
+/***************************************************************************
+ * This module contains a number of conversion functions from Python types
+ * to C++ types. Most of them meet the Python "converter" signature:
+ *
+ * typedef int (*converter)(PyObject *, void *);
+ *
+ * and thus can be passed as conversion functions to PyArg_ParseTuple
+ * and friends.
+ */
+
+#include <Python.h>
+#include "_backend_agg_basic_types.h"
+
+extern "C" {
+typedef int (*converter)(PyObject *, void *);
+
+int convert_from_attr(PyObject *obj, const char *name, converter func, void *p);
+int convert_from_method(PyObject *obj, const char *name, converter func, void *p);
+
+int convert_double(PyObject *obj, void *p);
+int convert_bool(PyObject *obj, void *p);
+int convert_cap(PyObject *capobj, void *capp);
+int convert_join(PyObject *joinobj, void *joinp);
+int convert_rect(PyObject *rectobj, void *rectp);
+int convert_rgba(PyObject *rgbaocj, void *rgbap);
+int convert_dashes(PyObject *dashobj, void *gcp);
+int convert_dashes_vector(PyObject *obj, void *dashesp);
+int convert_trans_affine(PyObject *obj, void *transp);
+int convert_path(PyObject *obj, void *pathp);
+int convert_pathgen(PyObject *obj, void *pathgenp);
+int convert_clippath(PyObject *clippath_tuple, void *clippathp);
+int convert_snap(PyObject *obj, void *snapp);
+int convert_sketch_params(PyObject *obj, void *sketchp);
+int convert_gcagg(PyObject *pygc, void *gcp);
+int convert_points(PyObject *pygc, void *pointsp);
+int convert_transforms(PyObject *pygc, void *transp);
+int convert_bboxes(PyObject *pygc, void *bboxp);
+int convert_colors(PyObject *pygc, void *colorsp);
+
+int convert_face(PyObject *color, GCAgg &gc, agg::rgba *rgba);
+}
+
+#endif