def _set_glyph_fields(self, obj: libsbml.SpeciesGlyph, layout: libsbml.Layout, model: libsbml.Model) -> None: """Set fields.""" super(SpeciesGlyph, self)._set_fields(obj, model) obj.setSpeciesId(self.species) bb = _create_bounding_box( x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, depth=self.depth, ) obj.setBoundingBox(bb) # text glyph t_glyph = layout.createTextGlyph() t_glyph.setId(f"tglyph_{self.sid}") t_glyph.setGraphicalObjectId(self.sid) t_glyph.setText(self.text) bb = _create_bounding_box( x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, depth=self.depth, ) t_glyph.setBoundingBox(bb)
def set_fields(self, obj: libsbml.SpeciesGlyph, layout: libsbml.Layout): super(CompartmentGlyph, self).set_fields(obj) obj.setCompartmentId(self.compartment) bb = _create_bounding_box( x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, depth=self.depth, ) obj.setBoundingBox(bb) # text glyph t_glyph = layout.createTextGlyph() t_glyph.setId("tglyph_{}".format(self.sid)) t_glyph.setGraphicalObjectId(self.sid) t_glyph.setText(self.text) bb = _create_bounding_box( x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, dpeth=self.depth, ) t_glyph.setBoundingBox(bb)
def set_fields(self, obj: libsbml.SpeciesGlyph, layout: libsbml.Layout): super(SpeciesGlyph, self).set_fields(obj) obj.setSpeciesId(self.species) bb = _create_bounding_box(x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, depth=self.depth) obj.setBoundingBox(bb) # text glyph t_glyph = layout.createTextGlyph() t_glyph.setId("tglyph_{}".format(self.sid)) t_glyph.setGraphicalObjectId(self.sid) t_glyph.setText(self.text) bb = _create_bounding_box(x=self.x, y=self.y, z=self.z, width=self.width, height=self.height, depth=self.depth) t_glyph.setBoundingBox(bb)