A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
grid.GraphicRenderer Class Reference

GraphicRenderer class. More...

Public Member Functions

def __init__ (self, start, end)
 Initializer. More...
 
def draw (self, ctx)
 Draw. More...
 
def get_data_rectangle (self)
 Get Data Rectangle. More...
 
def get_height (self)
 Get Height. More...
 
def get_range (self)
 Get Range. More...
 
def get_selection_rectangle (self)
 Get Selection Rectangle. More...
 
def get_width (self)
 Get Width. More...
 
def layout (self, width, height)
 Set Layout. More...
 
def scale_data (self, x)
 Get Data Rectangle. More...
 
def scale_selection (self, x)
 Scale Selection. More...
 
def set_data (self, data)
 Set Date. More...
 
def set_range (self, start, end)
 Set Range. More...
 
def set_top_legend (self, top_legend)
 Set Top Legend. More...
 

Private Member Functions

def __x_pixel (self, x, width)
 X Pixel. More...
 

Private Attributes

 __bot_scale
 bottom scale More...
 
 __data
 data More...
 
 __end
 end More...
 
 __height
 height More...
 
 __mid_scale
 mid scale More...
 
 __r_end
 end More...
 
 __r_start
 start More...
 
 __start
 start More...
 
 __top_legend
 top legend More...
 
 __width
 width More...
 

Detailed Description

GraphicRenderer class.

Definition at line 982 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

def grid.GraphicRenderer.__init__ (   self,
  start,
  end 
)

Initializer.

Parameters
selfthis object
startstart
endend
Returns
none

Definition at line 1005 of file grid.py.

Member Function Documentation

◆ __x_pixel()

def grid.GraphicRenderer.__x_pixel (   self,
  x,
  width 
)
private

X Pixel.

Parameters
selfthis object
xx
widthwidth
Returns
x pixel

Definition at line 1121 of file grid.py.

References grid.GraphicRenderer.__end, and grid.GraphicRenderer.__start.

◆ draw()

def grid.GraphicRenderer.draw (   self,
  ctx 
)

◆ get_data_rectangle()

def grid.GraphicRenderer.get_data_rectangle (   self)

◆ get_height()

def grid.GraphicRenderer.get_height (   self)

◆ get_range()

def grid.GraphicRenderer.get_range (   self)

Get Range.

Parameters
selfthis object
Returns
range

Definition at line 1086 of file grid.py.

References grid.GraphicRenderer.__r_end, grid.GraphicRenderer.__r_start, and return.

◆ get_selection_rectangle()

def grid.GraphicRenderer.get_selection_rectangle (   self)

◆ get_width()

def grid.GraphicRenderer.get_width (   self)

Get Width.

Parameters
selfthis object
Returns
width

Definition at line 1021 of file grid.py.

References grid.TopLegendRenderer.__width, grid.ScaleRenderer.__width, and grid.GraphicRenderer.__width.

◆ layout()

def grid.GraphicRenderer.layout (   self,
  width,
  height 
)

◆ scale_data()

def grid.GraphicRenderer.scale_data (   self,
  x 
)

Get Data Rectangle.

Parameters
selfthis object
xx
Returns
scaled x

Definition at line 1042 of file grid.py.

References grid.GraphicRenderer.__data, grid.GraphicRenderer.__r_end, grid.GraphicRenderer.__r_start, grid.TopLegendRenderer.__width, grid.ScaleRenderer.__width, and grid.GraphicRenderer.__width.

◆ scale_selection()

def grid.GraphicRenderer.scale_selection (   self,
  x 
)

Scale Selection.

Parameters
selfthis object
xthe X
Returns
scaled X

Definition at line 1062 of file grid.py.

References grid.GraphicRenderer.__end, grid.GraphicRenderer.__start, grid.TopLegendRenderer.__width, grid.ScaleRenderer.__width, and grid.GraphicRenderer.__width.

◆ set_data()

def grid.GraphicRenderer.set_data (   self,
  data 
)

Set Date.

Parameters
selfthis object
datadata
Returns
none

Definition at line 1092 of file grid.py.

◆ set_range()

def grid.GraphicRenderer.set_range (   self,
  start,
  end 
)

Set Range.

Parameters
selfthis object
startstart
endend
Returns
none

Definition at line 1070 of file grid.py.

References grid.GraphicRenderer.__end, grid.GraphicRenderer.__start, max, and min.

◆ set_top_legend()

def grid.GraphicRenderer.set_top_legend (   self,
  top_legend 
)

Set Top Legend.

Parameters
selfthis object
top_legendThe legend
Returns
none

Definition at line 1099 of file grid.py.

Member Data Documentation

◆ __bot_scale

grid.GraphicRenderer.__bot_scale
private

◆ __data

grid.GraphicRenderer.__data
private

◆ __end

grid.GraphicRenderer.__end
private

◆ __height

grid.GraphicRenderer.__height
private

◆ __mid_scale

grid.GraphicRenderer.__mid_scale
private

◆ __r_end

grid.GraphicRenderer.__r_end
private

◆ __r_start

grid.GraphicRenderer.__r_start
private

◆ __start

grid.GraphicRenderer.__start
private

◆ __top_legend

grid.GraphicRenderer.__top_legend
private

◆ __width

grid.GraphicRenderer.__width
private

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