@@ -1155,94 +1155,70 @@ def get_points(self):
1155
1155
self ._check (points )
1156
1156
return points
1157
1157
1158
- def set_locked_x0 (self , x0 ):
1159
- """
1160
- Set the value to be used for the locked x0.
1161
-
1162
- Parameters
1163
- ----------
1164
- x0 : float or None
1165
- The locked value for x0, or None to unlock.
1166
- """
1167
- self ._locked_points .mask [0 , 0 ] = x0 is None
1168
- self ._locked_points .data [0 , 0 ] = x0
1169
- self .invalidate ()
1170
-
1171
- def get_locked_x0 (self ):
1158
+ @property
1159
+ def locked_x0 (self ):
1172
1160
"""
1173
- Get the value used for the locked x0.
1161
+ float or None: The value used for the locked x0.
1174
1162
"""
1175
1163
if self ._locked_points .mask [0 , 0 ]:
1176
1164
return None
1177
1165
else :
1178
1166
return self ._locked_points [0 , 0 ]
1179
1167
1180
- def set_locked_y0 (self , y0 ):
1181
- """
1182
- Set the value to be used for the locked y0.
1183
-
1184
- Parameters
1185
- ----------
1186
- y0 : float or None
1187
- The locked value for y0, or None to unlock.
1188
- """
1189
- self ._locked_points .mask [0 , 1 ] = y0 is None
1190
- self ._locked_points .data [0 , 1 ] = y0
1168
+ @locked_x0 .setter
1169
+ def locked_x0 (self , x0 ):
1170
+ self ._locked_points .mask [0 , 0 ] = x0 is None
1171
+ self ._locked_points .data [0 , 0 ] = x0
1191
1172
self .invalidate ()
1192
1173
1193
- def get_locked_y0 (self ):
1174
+ @property
1175
+ def locked_y0 (self ):
1194
1176
"""
1195
- Get the value used for the locked y0.
1177
+ float or None: The value used for the locked y0.
1196
1178
"""
1197
1179
if self ._locked_points .mask [0 , 1 ]:
1198
1180
return None
1199
1181
else :
1200
1182
return self ._locked_points [0 , 1 ]
1201
1183
1202
- def set_locked_x1 (self , x1 ):
1203
- """
1204
- Set the value to be used for the locked x1.
1205
-
1206
- Parameters
1207
- ----------
1208
- x1 : float or None
1209
- The locked value for x1, or None to unlock.
1210
- """
1211
- self ._locked_points .mask [1 , 0 ] = x1 is None
1212
- self ._locked_points .data [1 , 0 ] = x1
1184
+ @locked_y0 .setter
1185
+ def locked_y0 (self , y0 ):
1186
+ self ._locked_points .mask [0 , 1 ] = y0 is None
1187
+ self ._locked_points .data [0 , 1 ] = y0
1213
1188
self .invalidate ()
1214
1189
1215
- def get_locked_x1 (self ):
1190
+ @property
1191
+ def locked_x1 (self ):
1216
1192
"""
1217
- Get the value used for the locked x1.
1193
+ float or None: The value used for the locked x1.
1218
1194
"""
1219
1195
if self ._locked_points .mask [1 , 0 ]:
1220
1196
return None
1221
1197
else :
1222
1198
return self ._locked_points [1 , 0 ]
1223
1199
1224
- def set_locked_y1 (self , y1 ):
1225
- """
1226
- Set the value to be used for the locked y1.
1227
-
1228
- Parameters
1229
- ----------
1230
- y1 : float or None
1231
- The locked value for y1, or None to unlock.
1232
- """
1233
- self ._locked_points .mask [1 , 1 ] = y1 is None
1234
- self ._locked_points .data [1 , 1 ] = y1
1200
+ @locked_x1 .setter
1201
+ def locked_x1 (self , x1 ):
1202
+ self ._locked_points .mask [1 , 0 ] = x1 is None
1203
+ self ._locked_points .data [1 , 0 ] = x1
1235
1204
self .invalidate ()
1236
1205
1237
- def get_locked_y1 (self ):
1206
+ @property
1207
+ def locked_y1 (self ):
1238
1208
"""
1239
- Get the value used for the locked y1.
1209
+ float or None: The value used for the locked y1.
1240
1210
"""
1241
1211
if self ._locked_points .mask [1 , 1 ]:
1242
1212
return None
1243
1213
else :
1244
1214
return self ._locked_points [1 , 1 ]
1245
1215
1216
+ @locked_y1 .setter
1217
+ def locked_y1 (self , y1 ):
1218
+ self ._locked_points .mask [1 , 1 ] = y1 is None
1219
+ self ._locked_points .data [1 , 1 ] = y1
1220
+ self .invalidate ()
1221
+
1246
1222
1247
1223
class Transform (TransformNode ):
1248
1224
"""
0 commit comments