Added "scale" member and get / set methods
This commit is contained in:
parent
5b4a9e9315
commit
d53cbcbcb2
|
@ -49,6 +49,7 @@ struct s_view {
|
||||||
short vis_w; /* clipped to screen dimensions */
|
short vis_w; /* clipped to screen dimensions */
|
||||||
short vis_h; /* visible width */
|
short vis_h; /* visible width */
|
||||||
struct rect clipping; /* clipping rectangle */
|
struct rect clipping; /* clipping rectangle */
|
||||||
|
float scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1899,6 +1900,16 @@ bool plot_get_dimensions(GRECT *dst)
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool plot_set_scale(float scale)
|
||||||
|
{
|
||||||
|
view.scale = scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
float plot_get_scale()
|
||||||
|
{
|
||||||
|
return(view.scale);
|
||||||
|
}
|
||||||
|
|
||||||
bool plot_clip(const struct rect *clip)
|
bool plot_clip(const struct rect *clip)
|
||||||
{
|
{
|
||||||
GRECT canvas, screen, gclip, isection;
|
GRECT canvas, screen, gclip, isection;
|
||||||
|
|
Loading…
Reference in New Issue