]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Change plot routine to take a drawing_area as argument
authorDirk Hohndel <dirk@hohndel.org>
Tue, 4 Oct 2011 19:14:26 +0000 (12:14 -0700)
committerDirk Hohndel <dirk@hohndel.org>
Tue, 4 Oct 2011 19:14:26 +0000 (12:14 -0700)
Previously we passed in width and height and the routine itself decided to
keep 5% margin around each edge - oddly doing this with double precision,
even though this is all integer coordinates.

Instead we are now passing in a drawing_area. We are kind of abusing the
cairo_rectangle_int_t data type here - but it seemed silly to redefine a
new data type for this.
Width and height give the size of the TOTAL drawing area (as before).
x and y give the offset from the edges - so the EFFECTIVE drawing area is
width-2x and height-2y
This is in preparation for adding tooltips - those need to know the
coordinate offsets from the edges - so having this hard coded inside the
plot function didn't make sense anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

No differences found