From a072c49b0ee57250f5e418434d8d5a0b9e74467f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 3 Mar 2010 16:09:46 +0000 Subject: [PATCH] updated coordinate system documentation git-svn-id: svn://anubis/anaglym/trunk@276 99a6e188-d820-4881-8870-2d33a10e2619 --- .todo | 1 + doc/index.html | 7 ++++++- tests/managed_objects.lua | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.todo b/.todo index 5e7b7d7..2a63452 100644 --- a/.todo +++ b/.todo @@ -1,2 +1,3 @@ add audio capabilities add gradient functionality +fix blending of overlay drawing routines diff --git a/doc/index.html b/doc/index.html index 82f5603..612591c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -81,7 +81,12 @@ The Z axis extends positively into the "air" above the XY plane, and the default gravity vector pulls along the negative Z axis.

-FIXME: 2D coordinates +When 2D coordinates are used (with mouse cursor positions and +overlay drawing routines), the origin is in the lower-left corner of +the screen. +The X axis increases positively toward the right edge of the screen. +The Y axis increases positively toward the top of the screen. +The upper-right pixel on the screen has coordinates (width-1, height-1).

diff --git a/tests/managed_objects.lua b/tests/managed_objects.lua index 1a2991b..4cbec08 100644 --- a/tests/managed_objects.lua +++ b/tests/managed_objects.lua @@ -80,4 +80,9 @@ function update_overlay_event(width, height) end ag.fillArc(1, 1, 0, 50, 50, 30, 30, 330) ag.fillCircle(1, 0, 1, width - 50, height - 50, 40) + ag.drawRect(1, 0.5, 0, width, height, width/2, height/2) + ag.drawPoint(1, 0, 1, 0, 0, 0) + ag.drawPoint(1, 0, 1, 0, width-1, height-1) + ag.drawPoint(1, 0, 1, 1, -1, -1) + ag.drawPoint(1, 0, 1, 1, width, height) end