implement a buffer for gki which allocates memory in blocks so that a
new memory allocation is not needed everytime metacode is appended
|
|
|
|
|
init(self,
metacode=None)
Initialize to empty buffer or to metacode |
source code
|
|
|
|
prepareToRedraw(self)
Reset pointers in preparation for redraw |
source code
|
|
|
|
|
|
|
split(self)
Split this buffer at nextTranslate and return a new buffer object
with the rest of the metacode. |
source code
|
|
|
|
append(self,
metacode,
isUndoable=0)
Append metacode to buffer |
source code
|
|
|
|
isUndoable(self)
Returns true if there is anything to undo on this plot |
source code
|
|
|
|
|
|
|
isRedoable(self)
Returns true if there is anything to redo on this plot |
source code
|
|
|
|
|
|
|
get(self)
Return buffer contents (as numpy array, even if empty) |
source code
|
|
|
|
delget(self,
last=0)
Return buffer up to end pointer, deleting those elements |
source code
|
|
|
|
getNextCode(self)
Read next opcode and argument from buffer, returning a tuple with
(opcode, arg). |
source code
|
|
|
|
|
|
|
|
|
|
|