extends TextureRect var image func create_image(points): image = Image.new() image.create(get_parent().get_parent().width, get_parent().get_parent().height, false, Image.FORMAT_RGBA8) image.fill(Color.white) image.lock() for point in points: image.set_pixel(point.x, point.y, Color.black) image.unlock() func update_texture(): var texture = ImageTexture.new() texture.create_from_image(image) set_texture(texture) func _on_Control_new_poisson(points): create_image(points) update_texture()