aboutsummaryrefslogtreecommitdiff
path: root/Week8/src/qtrees/WhiteLeaf.java
diff options
context:
space:
mode:
Diffstat (limited to 'Week8/src/qtrees/WhiteLeaf.java')
-rw-r--r--Week8/src/qtrees/WhiteLeaf.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/Week8/src/qtrees/WhiteLeaf.java b/Week8/src/qtrees/WhiteLeaf.java
new file mode 100644
index 0000000..31be533
--- /dev/null
+++ b/Week8/src/qtrees/WhiteLeaf.java
@@ -0,0 +1,24 @@
+package qtrees;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * @author Camil Staps, s4498062
+ */
+public class WhiteLeaf extends QTNode {
+
+ @Override
+ public void fillBitmap(int x, int y, int width, Bitmap bitmap) {
+ int old_x = x, old_y = y;
+ for (; x < old_x + width; x++)
+ for (y = old_y; y < old_y + width; y++)
+ bitmap.setBit(x, y, true);
+ }
+
+ @Override
+ public void writeNode(Writer out) throws IOException {
+ out.write("01");
+ }
+
+}