Python kivy.properties 模块,NumericProperty() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用kivy.properties.NumericProperty()

项目:Wall-EEG    作者:neurotechuoft    | 项目源码 | 文件源码
def add_point_vals(self, x_val, y_val):
        # Calculate position of point according to coordinate value
        x_pos = round(x_val * self.x_increment)
        y_pos = self.graph_height - round(y_val * self.y_increment)

        # Create new point
        new_point = Point(x_pos, y_pos, x_val, y_val)
        # new_point.x_pos = NumericProperty(x_pos)
        # new_point.y_pos = NumericProperty(y_pos)
        # new_point.x_value = x_val
        # new_point.y_value = y_val

        # Add point
        self.add_point(new_point)