mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Stop passing around gc and pi
Make the graphics_context part of the ProfileGraphicsView and remember that the plot info is already a part of the graphics_context (we kept passing around both of them in the Gtk code... pointless but a leftover from before adding the pi to the gc...) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
688276b6f2
commit
6f06c31d0b
5 changed files with 103 additions and 98 deletions
|
|
@ -84,6 +84,10 @@ int get_maxdepth(struct plot_info *pi);
|
|||
#define MIDDLE (0)
|
||||
#define BOTTOM (-1)
|
||||
|
||||
#define SCALEXGC(x) (((x) - gc.leftx) / (gc.rightx - gc.leftx) * gc.maxx)
|
||||
#define SCALEYGC(y) (((y) - gc.topy) / (gc.bottomy - gc.topy) * gc.maxy)
|
||||
#define SCALEGC(x,y) SCALEXGC(x),SCALEYGC(y)
|
||||
|
||||
#define SCALEX(gc,x) (((x)-gc->leftx)/(gc->rightx-gc->leftx)*gc->maxx)
|
||||
#define SCALEY(gc,y) (((y)-gc->topy)/(gc->bottomy-gc->topy)*gc->maxy)
|
||||
#define SCALE(gc,x,y) SCALEX(gc,x),SCALEY(gc,y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue