def _generateNodeGraphicsSection(self, oglObject: OglObject) -> str: pos = oglObject.GetPosition() x = pos[0] y = pos[1] z = 0 dimensions = oglObject.GetSize() w = dimensions[0] h = dimensions[1] d = 0 gml = ( f'{GMLExporter.doubleTab}{GMLExporter.GRAPHICS_TOKEN} {GMLExporter.START_TOKEN}\n' f'{GMLExporter.tripleTab}{GMLExporter.X_POSITION_TOKEN} {x}\n' f'{GMLExporter.tripleTab}{GMLExporter.Y_POSITION_TOKEN} {y}\n' f'{GMLExporter.tripleTab}{GMLExporter.Z_POSITION_TOKEN} {z}\n' f'{GMLExporter.tripleTab}{GMLExporter.WIDTH_TOKEN} {w}\n' f'{GMLExporter.tripleTab}{GMLExporter.HEIGHT_TOKEN} {h}\n' f'{GMLExporter.tripleTab}{GMLExporter.DEPTH_TOKEN} {d}\n' f'{GMLExporter.tripleTab}type "rectangle"\n' f'{GMLExporter.tripleTab}width 0.12\n' f'{GMLExporter.tripleTab}fill "#ff0000"\n' f'{GMLExporter.tripleTab}outline "#000000"\n' f'{GMLExporter.doubleTab}{GMLExporter.END_TOKEN}\n' ) return gml
def __displayAnOglObject(self, oglObject: OglObject, umlFrame: UmlDiagramsFrame): x, y = oglObject.GetPosition() umlFrame.addShape(oglObject, x, y)