1. German Larrain
  2. ars

Commits

German Larrain  committed b789d87

graphics.adapter.ScreenshotRecorder: update considering 30a287ba3c81.

  • Participants
  • Parent commits 8170a27
  • Branches dev

Comments (0)

Files changed (1)

File ars/graphics/adapters.py

View file
  • Ignore whitespace
 
 	"""
 
+	file_extension = 'png'
+
 	def __init__(self, base_filename='screenshot_', graphics_adapter=None):
 		self.base_filename = base_filename
 		self.gAdapter = graphics_adapter
 
 	def write(self, index=1, time=None):
 		"""
-		Writes the current image displayed in the render window as a PNG file
-		named 'self.base_filename' with	the 'index' number appended, and a
-		'.png' extension.
+		.. note::
+		   Image files format is PNG, and extension is ``.png``.
 
 		"""
 		# TODO: see if the workaround (get render_window and create
 		image_getter.Update()
 
 		writer = vtk.vtkPNGWriter()
-		writer.SetFileName('%s%d.png' % (self.base_filename, index))
+		writer.SetFileName(self.calc_filename(index))
 		writer.SetInputConnection(image_getter.GetOutputPort())
 		writer.Write()