diff --git a/dotscape b/dotscape index 5feee0d..b285c65 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/ndc.sml b/fcore/ndc.sml index 64ad511..947fbb9 100644 --- a/fcore/ndc.sml +++ b/fcore/ndc.sml @@ -12,14 +12,14 @@ struct , right, top ] - fun ltrbToVertexRgb (left, top, right, bottom, r, g, b) = - #[ left, bottom, r, g, b - , right, bottom, r, g, b - , left, top, r, g, b + fun ltrbToVertexRgb (startX, startY, endX, endY, r, g, b) = + #[ startX, endY, r, g, b + , endX, endY, r, g, b + , startX, startY, r, g, b - , left, top, r, g, b - , right, bottom, r, g, b - , right, top, r, g, b + , startX, startY, r, g, b + , endX, endY, r, g, b + , endX, startY, r, g, b ] fun fromPixelX (xpos, windowWidth, windowHeight) = diff --git a/fcore/quad-tree.sml b/fcore/quad-tree.sml index fc5d429..b1dcde0 100644 --- a/fcore/quad-tree.sml +++ b/fcore/quad-tree.sml @@ -553,7 +553,15 @@ struct , ") - halfHeight) / halfHeight)" ] in - x :: y :: ex :: ex :: y :: ey :: r :: g :: b :: acc + (* based on triangle order formed by `Ndc.ltrbToVertexRgb` function *) + x :: ey :: r :: g :: b :: + ex :: ey :: r :: g :: b :: + x :: y :: r :: g :: b :: + + x :: y :: r :: g :: b :: + ex :: ey :: r :: g :: b :: + ex :: y :: r :: g :: b :: + acc end fun toExportString (squares, canvasWidth, canvasHeight) =