mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-04 13:14:23 +08:00
Deprecate bresenham function
This commit is contained in:
@@ -1,5 +1,2 @@
|
||||
from ._draw import line, polygon, ellipse, ellipse_perimeter, \
|
||||
circle, circle_perimeter, set_color
|
||||
|
||||
|
||||
bresenham = line
|
||||
circle, circle_perimeter, set_color, bresenham
|
||||
|
||||
@@ -8,6 +8,7 @@ import numpy as np
|
||||
cimport numpy as cnp
|
||||
from libc.math cimport sqrt
|
||||
from skimage._shared.geometry cimport point_in_polygon
|
||||
from skimage._shared.utils import deprecated
|
||||
|
||||
|
||||
def line(Py_ssize_t y, Py_ssize_t x, Py_ssize_t y2, Py_ssize_t x2):
|
||||
@@ -73,6 +74,9 @@ def line(Py_ssize_t y, Py_ssize_t x, Py_ssize_t y2, Py_ssize_t x2):
|
||||
return rr, cc
|
||||
|
||||
|
||||
bresenham = deprecated('skimage.draw.line')(line)
|
||||
|
||||
|
||||
def polygon(y, x, shape=None):
|
||||
"""Generate coordinates of pixels within polygon.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user