lsst.display.ds9 gdb4ec4c597+d5035b3bc9
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst.display.ds9.ds9.Buffer Class Reference
Inheritance diagram for lsst.display.ds9.ds9.Buffer:

Public Member Functions

 __init__ (self, size=0)
 
 set (self, size, silent=True)
 
 pushSize (self, size=-1)
 
 popSize (self)
 
 flush (self, silent=True)
 

Protected Member Functions

 _getSize (self)
 

Protected Attributes

 _commands
 
 _lenCommands
 
 _bufsize
 

Detailed Description

Buffer to control sending commands to DS9.

Notes
-----
The usual usage pattern is:

>>> with ds9.Buffering():
...     # bunches of ds9.{dot,line} commands
...     ds9.flush()
...     # bunches more ds9.{dot,line} commands

Definition at line 111 of file ds9.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.display.ds9.ds9.Buffer.__init__ (   self,
  size = 0 
)

Definition at line 124 of file ds9.py.

Member Function Documentation

◆ _getSize()

lsst.display.ds9.ds9.Buffer._getSize (   self)
protected
Get the current DS9 buffer size.

Returns
-------
size : `int`
    Size of buffer.

Definition at line 158 of file ds9.py.

◆ flush()

lsst.display.ds9.ds9.Buffer.flush (   self,
  silent = True 
)
Flush the pending commands.

Parameters
----------
silent : `bool`, optional
    Do not print error messages.

Definition at line 197 of file ds9.py.

◆ popSize()

lsst.display.ds9.ds9.Buffer.popSize (   self)
Switch back to the previous command buffer size.

Notes
-----
See also `pushSize`.

Definition at line 185 of file ds9.py.

◆ pushSize()

lsst.display.ds9.ds9.Buffer.pushSize (   self,
  size = -1 
)
Replace current DS9 command buffer size.

Parameters
----------
size : `int`, optional
    Size of buffer. A negative value sets the largest possible
    buffer.

Notes
-----
See also `popSize`.

Definition at line 168 of file ds9.py.

◆ set()

lsst.display.ds9.ds9.Buffer.set (   self,
  size,
  silent = True 
)
Set the ds9 buffer size to size.

Parameters
----------
size : `int`
    Size of buffer. Requesting a negative size provides the
    largest possible buffer given bugs in xpa.
silent : `bool`, optional
    Do not print error messages (default `True`).

Definition at line 131 of file ds9.py.

Member Data Documentation

◆ _bufsize

lsst.display.ds9.ds9.Buffer._bufsize
protected

Definition at line 127 of file ds9.py.

◆ _commands

lsst.display.ds9.ds9.Buffer._commands
protected

Definition at line 125 of file ds9.py.

◆ _lenCommands

lsst.display.ds9.ds9.Buffer._lenCommands
protected

Definition at line 126 of file ds9.py.


The documentation for this class was generated from the following file: