added getter and setter for VectorizedPoint's location

This commit is contained in:
Ben Hambrecht
2018-02-07 09:45:36 +01:00
parent 1e88bf3946
commit 8e0c84946f

View File

@ -457,6 +457,12 @@ class VectorizedPoint(VMobject):
def get_height(self):
return self.artificial_height
def get_location(self):
return self.get_anchors()[0]
def set_location(self,new_loc):
self.set_points(np.array([new_loc]))
class BackgroundColoredVMobject(VMobject):
CONFIG = {
# Can be set to None, using set_background_array to initialize instead