This repository was archived by the owner on Mar 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,16 @@ def distance(self, other: Coord) -> int:
8383
8484class Direction (Enum ):
8585 """
86- Defines base directions.
86+ Defines base directions. Can be used to create Coords relative
87+ to a direction.
88+
89+ example::
90+
91+ ```
92+ start = Coord(1, 1)
93+ end = start + (Direction.LEFT * 20)
94+ end
95+ >>> Coord(x=-19, y=1)
8796 """
8897 LEFT = Coord (- 1 , 0 )
8998 RIGHT = Coord (1 , 0 )
@@ -98,7 +107,19 @@ def __add__(self, other: Direction) -> Coord:
98107
99108
100109class Animater (tk .Canvas ):
110+ """
111+ Inherits Canvas. Manager for executing animation move commands.
112+ Currently only event base animations are supported.
101113
114+ example::
115+
116+ ```
117+ motion = Motion(...)
118+ window = Animator(...)
119+ window.add_motion(motion)
120+ window.add_event('<Enter>')
121+ ```
122+ """
102123 motions = []
103124
104125 def add_event (self , event : tk .EventType ):
@@ -195,11 +216,11 @@ def __iter__(self):
195216
196217def vector (start : Coord , end : Coord , step : int = 60 ) -> List [Coord ]:
197218 """
198- Creates a list of all the Coords on a straight line from `start` to `end`.
219+ Creates a list of all the Coords on a straight line from `start` to `end` (inclusive) .
199220
200221 param:
201222 start: Coord -- The starting point.
202- end: Coord -- The ending point.
223+ end: Coord -- The end point.
203224 step: int (optional) -- The desired number of points to include. Defaults to 60.
204225 Actual resulting length may vary.
205226
You can’t perform that action at this time.
0 commit comments