Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
jLM.ImageAnalysis.SvgContext Class Reference

Public Member Functions

 __init__ (self, nx, ny, filename=None)
 __enter__ (self)
 __exit__ (self, type, value, traceback)

Public Attributes

 w = nx
 h = ny
 fileObj = io.BytesIO()
 surface = cairo.SVGSurface(self.fileObj,nx,ny)
 context = cairo.Context(self.surface)
 filename = filename

Constructor & Destructor Documentation

◆ __init__()

jLM.ImageAnalysis.SvgContext.__init__ ( self,
nx,
ny,
filename = None )
Context manager to draw to an SVG surface.

Arguments:
    nx(int):
      Width in pixels
    ny(int):
      Height in pixels
Keyword Arguments:
    filename (str):
        Write SVG to file as well as displaying in notebook

Member Function Documentation

◆ __enter__()

jLM.ImageAnalysis.SvgContext.__enter__ ( self)

◆ __exit__()

jLM.ImageAnalysis.SvgContext.__exit__ ( self,
type,
value,
traceback )

Member Data Documentation

◆ context

jLM.ImageAnalysis.SvgContext.context = cairo.Context(self.surface)

◆ filename

jLM.ImageAnalysis.SvgContext.filename = filename

◆ fileObj

jLM.ImageAnalysis.SvgContext.fileObj = io.BytesIO()

◆ h

jLM.ImageAnalysis.SvgContext.h = ny

◆ surface

jLM.ImageAnalysis.SvgContext.surface = cairo.SVGSurface(self.fileObj,nx,ny)

◆ w

jLM.ImageAnalysis.SvgContext.w = nx

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