#Squarified Treemap

3 messages · Page 1 of 1 (latest)

novel helm
#

When executing the code below, the result looks like the attached image. There are bugs such as rectangles being placed outside the screen. Is there something wrong with how I’m using the treemap crate, or is there a bug in the crate itself?
(I'm sorry I couldn't paste the code! I hit the char limit...)

cinder verge
#
                bounds.x as f32 - frame.rect().w() / 2.,
                bounds.y as f32 - frame.rect().w() / 2.,

you're using width on both?

#

also, what exactly are you trying to achieve with these lines? If you're trying to to center them, you might want to write (frame.rect().w() - bounds.x as f32) / 2.,