mirror of https://github.com/kivy/kivy.git
Merge pull request #1429 from Ian-Foote/canvas_doc
Document CanvasBase and Canvas.clear
This commit is contained in:
commit
cc8638cd5b
|
@ -508,6 +508,7 @@ cdef class Callback(Instruction):
|
|||
|
||||
|
||||
cdef class CanvasBase(InstructionGroup):
|
||||
'''CanvasBase provides the context manager methods for :class:`Canvas`.'''
|
||||
def __enter__(self):
|
||||
pushActiveCanvas(self)
|
||||
|
||||
|
@ -558,6 +559,7 @@ cdef class Canvas(CanvasBase):
|
|||
'''
|
||||
|
||||
cpdef clear(self):
|
||||
'''Clears every :class:`Instruction` in the canvas, leaving it clean.'''
|
||||
cdef Instruction c
|
||||
for c in self.children[:]:
|
||||
if c is self._before or c is self._after:
|
||||
|
|
Loading…
Reference in New Issue