Class Contour
Defined in: Layout.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Contour(top)
Code for laying out rectangles, given that layout is also happening
in adjacent blocks at the same time
This code does a lot of linear searching; n should be low enough that
it's not a problem but if it turns out to be, some of it can be changed to
binary searching without too much work.
|
Method Attributes | Method Name and Description |
---|---|
getFit(x, height, minTop)
|
|
getNextTop(fit)
|
|
insertFit(fit, x, top, height)
|
|
unionWith(x, top, height)
|
Class Detail
Contour(top)
Code for laying out rectangles, given that layout is also happening
in adjacent blocks at the same time
This code does a lot of linear searching; n should be low enough that
it's not a problem but if it turns out to be, some of it can be changed to
binary searching without too much work. Another possibility is to merge
contour spans and give up some packing closeness in exchange for speed
(the code already merges spans that have the same x-coord and are vertically
contiguous).
- Parameters:
- top
Method Detail
getFit(x, height, minTop)
- Parameters:
- x
- height
- minTop
getNextTop(fit)
- Parameters:
- fit
insertFit(fit, x, top, height)
- Parameters:
- fit
- x
- top
- height
unionWith(x, top, height)
- Parameters:
- x
- top
- height