File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 2323_log = logging .getLogger (__name__ )
2424
2525
26- @_api .deprecated ("3.6" )
27- def get_rotation (rotation ):
28- """
29- Return *rotation* normalized to an angle between 0 and 360 degrees.
30-
31- Parameters
32- ----------
33- rotation : float or {None, 'horizontal', 'vertical'}
34- Rotation angle in degrees. *None* and 'horizontal' equal 0,
35- 'vertical' equals 90.
36-
37- Returns
38- -------
39- float
40- """
41- try :
42- return float (rotation ) % 360
43- except (ValueError , TypeError ) as err :
44- if cbook ._str_equal (rotation , 'horizontal' ) or rotation is None :
45- return 0.
46- elif cbook ._str_equal (rotation , 'vertical' ):
47- return 90.
48- else :
49- raise ValueError (f"rotation is { rotation !r} ; expected either "
50- "'horizontal', 'vertical', numeric value, or "
51- "None" ) from err
52-
53-
5426def _get_textbox (text , renderer ):
5527 """
5628 Calculate the bounding box of the text.
You can’t perform that action at this time.
0 commit comments