drop suppoprt for svg output
This commit is contained in:
parent
4a0de2a13d
commit
37e9dcc1f6
5 changed files with 10 additions and 19 deletions
|
@ -48,7 +48,7 @@ class RenderEngine(ABC):
|
|||
self.background_rgb = tuple(int(background[i:i + 2], 16)/255 for i in range(1, 6, 2))
|
||||
|
||||
@abstractmethod
|
||||
def get_png(self) -> bytes:
|
||||
def render(self) -> bytes:
|
||||
# render the image to png.
|
||||
pass
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ class OpenGLEngine(Base3DEngine):
|
|||
|
||||
worker = OpenGLWorker()
|
||||
|
||||
def get_png(self) -> bytes:
|
||||
def render(self) -> bytes:
|
||||
return self.worker.render(self.width, self.height, self.background_rgb,
|
||||
np.hstack(self.vertices).astype(np.float32).tobytes() if self.vertices else b'')
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class SVGEngine(RenderEngine):
|
|||
result += '</svg>'
|
||||
return result
|
||||
|
||||
def get_png(self):
|
||||
def render(self):
|
||||
# render the image to png. returns bytes if f is None, otherwise it calls f.write()
|
||||
|
||||
if self.width == 256 and self.height == 256 and not self.g:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue