hlfw.ca

binpack

Download patch

ref: fcfc068be973277679492de19cf0bc52eed03db0
parent: 895907b3e3845fe6ebd172873b104ae00ff8e576
author: Halfwit <michaelmisch1985@gmail.com>
date: Sun Sep 23 10:25:55 PDT 2018

Still tweaking readme

Signed-off-by: Halfwit <michaelmisch1985@gmail.com>

--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@
 We use a list of points to define a face, the face and bounding box that it bisects representing all available space to place subsequent windows (rectangles).
 
 Examples:
+
 ```
 	Our window
 	|-----------------------------------------------|
@@ -28,9 +29,11 @@
 	|                                               |
 	|                                               |
 	|-----------------------------------------------|
+```
 	
-	We place the first window inside, starting at (0,0) (top left, this is graphics after all)
+We place the first window inside, starting at (0,0) (top left, this is graphics after all)
 
+```
 	|------------------|----------------------------|
 	|                  |                            |
 	|                  |                            |
@@ -48,7 +51,7 @@
 	Points are (18,0) (18,7) and (0,7)
 ```
 
-	This essentially creates 3 new points of interest in our available space. The top right, bottom right, and bottom left points of the window we just placed - we're going to keep track of these, and these alone.
+This essentially creates 3 new points of interest in our available space. The top right, bottom right, and bottom left points of the window we just placed - we're going to keep track of these, and these alone.
 
 ```
 	|------------------|----------------------------|
@@ -66,9 +69,11 @@
 	|                                               |
 	|-----------------------------------------------|
 	Points are (18,0) (18,7) (16,7) (16,12) (0,12)
-    Notice we removed the point (0,7) - this requires explanation.
-	note the following:
+```
 
+Notice we removed the point (0,7) - this requires explanation.
+
+```
 	|------------------|-----------|----------------|
 	|                  |           |                |
 	|                  |   Win #3  |                |
@@ -86,9 +91,9 @@
 
 ```
 
-	Placing window #3 would see that there is a point, (0,7) with enough space both horizontally and vertically to fit and overlap window #2. Previous versions of binpack checked for windows occupying the same space explicitely, but this is an expensive operation. using and updating an accurate list of applicable points is a means to an end to have a highly efficient packing algorithm. 
+Placing window #3 would see that there is a point, (0,7) with enough space both horizontally and vertically to fit and overlap window #2. Previous versions of binpack checked for windows occupying the same space explicitely, but this is an expensive operation. using and updating an accurate list of applicable points is a means to an end to have a highly efficient packing algorithm. 
 
-##Two special cases here require further consideration
+## Two special cases here require further consideration
 
 ```
     |----------------|------|   |-------------|x|--|
@@ -104,8 +109,10 @@
 ```
 
 ### First window
-	In the case of placing window #4, we test previous points for >= y && >= x than a point we're testing. An example where this would be true is the bottom lef
+
+In the case of placing window #4, we test previous points for >= y && >= x than a point we're testing. An example where this would be true is the bottom lef
 t corner of window #3 - we attempt to place with our point starting on the same y access as the bottom of #3. In this case it fits. We could even test point 2, and since it's a point on the same axis, we know there's something likely obstructing.
 
 ### Second window
-	First we test #3 to fit, against the secont point (which is the bottom right of #1). It doesn't fit, as #2 is blocking. We now test future points for >= x && >= y points. The top right of #2 meet both reqs, We use that same x axis to place window 3.
+
+First we test #3 to fit, against the secont point (which is the bottom right of #1). It doesn't fit, as #2 is blocking. We now test future points for >= x && >= y points. The top right of #2 meet both reqs, We use that same x axis to place window 3.