eric6/Graphics/UMLClassDiagramBuilder.py

changeset 8217
385f60c94548
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8216:6a042a54e0f7 8217:385f60c94548
178 currentHeight = 0 178 currentHeight = 0
179 179
180 for rect in generation: 180 for rect in generation:
181 if rect.bottom() > currentHeight: 181 if rect.bottom() > currentHeight:
182 currentHeight = rect.bottom() 182 currentHeight = rect.bottom()
183 currentWidth = currentWidth + rect.right() 183 currentWidth += rect.right()
184 184
185 # update totals 185 # update totals
186 if currentWidth > width: 186 if currentWidth > width:
187 width = currentWidth 187 width = currentWidth
188 height = height + currentHeight 188 height += currentHeight
189 189
190 # store generation info 190 # store generation info
191 widths.append(currentWidth) 191 widths.append(currentWidth)
192 heights.append(currentHeight) 192 heights.append(currentHeight)
193 193
194 # add in some whitespace 194 # add in some whitespace
195 width = width * whiteSpaceFactor 195 width *= whiteSpaceFactor
196 height = height * whiteSpaceFactor - 20 196 height = height * whiteSpaceFactor - 20
197 verticalWhiteSpace = 40.0 197 verticalWhiteSpace = 40.0
198 198
199 sceneRect = self.umlView.sceneRect() 199 sceneRect = self.umlView.sceneRect()
200 width += 50.0 200 width += 50.0

eric ide

mercurial