Skip to content

Commit 8394a54

Browse files
committed
Make it work
1 parent 925f810 commit 8394a54

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

modules/yup_python/bindings/yup_YupGraphics_bindings.cpp

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ void registerPoint (py::module_& m)
156156
.def ("toFloat", [](const T& self) { return self.template to<float>(); })
157157
.def ("toDouble", [](const T& self) { return self.template to<double>(); })
158158

159-
// Add properties for more pythonic access
160-
.def_property("x", &T::getX, &T::setX)
161-
.def_property("y", &T::getY, &T::setY)
162-
163159
.def ("__repr__", [](const T& self)
164160
{
165161
String result;
@@ -275,14 +271,6 @@ void registerLine (py::module_& m)
275271
.def (py::self == py::self)
276272
.def (py::self != py::self)
277273

278-
// Properties for more pythonic access
279-
.def_property("start_x", &T::getStartX, [](T& self, ValueType value) { self.setStart (self.getStart().withX(value)); })
280-
.def_property("start_y", &T::getStartY, [](T& self, ValueType value) { self.setStart (self.getStart().withY(value)); })
281-
.def_property("end_x", &T::getEndX, [](T& self, ValueType value) { self.setEnd (self.getEnd().withX(value)); })
282-
.def_property("end_y", &T::getEndY, [](T& self, ValueType value) { self.setEnd (self.getEnd().withY(value)); })
283-
.def_property("start", &T::getStart, &T::setStart)
284-
.def_property("end", &T::getEnd, &T::setEnd)
285-
286274
// Operators
287275
.def ("__repr__", [] (const T& self)
288276
{
@@ -502,18 +490,6 @@ void registerRectangle (py::module_& m)
502490
//.def (py::self - Point<ValueType>())
503491
//.def (py::self -= Point<ValueType>())
504492

505-
// Add properties for more pythonic access
506-
.def_property("x", &T::getX, &T::setX)
507-
.def_property("y", &T::getY, &T::setY)
508-
.def_property("width", &T::getWidth, &T::setWidth)
509-
.def_property("height", &T::getHeight, &T::setHeight)
510-
.def_property("left", &T::getLeft, &T::setLeft)
511-
.def_property("top", &T::getTop, &T::setTop)
512-
.def_property("right", &T::getRight, &T::setRight)
513-
.def_property("bottom", &T::getBottom, &T::setBottom)
514-
.def_property("center_x", &T::getCenterX, &T::setCenterX)
515-
.def_property("center_y", &T::getCenterY, &T::setCenterY)
516-
517493
.def ("__repr__", [] (const T& self)
518494
{
519495
String result;
@@ -778,14 +754,6 @@ void registerYupGraphicsBindings (py::module_& m)
778754
.def (py::self != py::self)
779755
.def ("approximatelyEqualTo", &AffineTransform::approximatelyEqualTo)
780756

781-
// Matrix component access as read-only properties
782-
.def_property_readonly("scale_x", &AffineTransform::getScaleX)
783-
.def_property_readonly("shear_x", &AffineTransform::getShearX)
784-
.def_property_readonly("translate_x", &AffineTransform::getTranslateX)
785-
.def_property_readonly("shear_y", &AffineTransform::getShearY)
786-
.def_property_readonly("scale_y", &AffineTransform::getScaleY)
787-
.def_property_readonly("translate_y", &AffineTransform::getTranslateY)
788-
789757
// Representation
790758
.def ("__repr__", [](const AffineTransform& self)
791759
{
@@ -924,13 +892,6 @@ void registerYupGraphicsBindings (py::module_& m)
924892
.def ("__len__", &Path::size)
925893
.def ("__bool__", [](const Path& self) { return self.size() > 0; })
926894

927-
// Operators
928-
.def (py::self += py::self)
929-
.def (py::self + py::self)
930-
931-
// Properties for more pythonic access
932-
.def_property_readonly("bounds", &Path::getBounds)
933-
934895
// Representation
935896
.def ("__repr__", [](const Path& self) {
936897
String result;
@@ -1071,19 +1032,6 @@ void registerYupGraphicsBindings (py::module_& m)
10711032
.def (py::self == py::self)
10721033
.def (py::self != py::self)
10731034

1074-
// Properties for more pythonic access
1075-
.def_property("red", &Color::getRed, py::overload_cast<uint8> (&Color::setRed))
1076-
.def_property("green", &Color::getGreen, py::overload_cast<uint8> (&Color::setGreen))
1077-
.def_property("blue", &Color::getBlue, py::overload_cast<uint8> (&Color::setBlue))
1078-
.def_property("alpha", &Color::getAlpha, py::overload_cast<uint8> (&Color::setAlpha))
1079-
.def_property_readonly("red_float", &Color::getRedFloat)
1080-
.def_property_readonly("green_float", &Color::getGreenFloat)
1081-
.def_property_readonly("blue_float", &Color::getBlueFloat)
1082-
.def_property_readonly("alpha_float", &Color::getAlphaFloat)
1083-
.def_property_readonly("hue", &Color::getHue)
1084-
.def_property_readonly("saturation", &Color::getSaturation)
1085-
.def_property_readonly("luminance", &Color::getLuminance)
1086-
10871035
// Representation
10881036
.def ("__repr__", [] (const Color& self)
10891037
{
@@ -1780,22 +1728,6 @@ void registerYupGraphicsBindings (py::module_& m)
17801728
.def ("getContextScale", &Graphics::getContextScale)
17811729
.def ("getFactory", &Graphics::getFactory, py::return_value_policy::reference_internal)
17821730
.def ("getRenderer", &Graphics::getRenderer, py::return_value_policy::reference_internal)
1783-
1784-
// Properties for more pythonic access
1785-
.def_property("fill_color", &Graphics::getFillColor, &Graphics::setFillColor)
1786-
.def_property("stroke_color", &Graphics::getStrokeColor, &Graphics::setStrokeColor)
1787-
.def_property("fill_color_gradient", &Graphics::getFillColorGradient, &Graphics::setFillColorGradient)
1788-
.def_property("stroke_color_gradient", &Graphics::getStrokeColorGradient, &Graphics::setStrokeColorGradient)
1789-
.def_property("stroke_width", &Graphics::getStrokeWidth, &Graphics::setStrokeWidth)
1790-
.def_property("feather", &Graphics::getFeather, &Graphics::setFeather)
1791-
.def_property("opacity", &Graphics::getOpacity, &Graphics::setOpacity)
1792-
.def_property("stroke_join", &Graphics::getStrokeJoin, &Graphics::setStrokeJoin)
1793-
.def_property("stroke_cap", &Graphics::getStrokeCap, &Graphics::setStrokeCap)
1794-
.def_property("blend_mode", &Graphics::getBlendMode, &Graphics::setBlendMode)
1795-
.def_property("drawing_area", &Graphics::getDrawingArea, &Graphics::setDrawingArea)
1796-
.def_property("transform", &Graphics::getTransform, &Graphics::setTransform)
1797-
.def_property("clip_path", &Graphics::getClipPath, py::overload_cast<const Rectangle<float>&>(&Graphics::setClipPath))
1798-
.def_property_readonly("context_scale", &Graphics::getContextScale)
17991731
;
18001732

18011733
// ============================================================================================ yup::Colors

0 commit comments

Comments
 (0)