Added "scale" member and get / set methods

This commit is contained in:
Ole Loots 2013-12-04 00:41:17 +01:00
parent 5b4a9e9315
commit d53cbcbcb2
1 changed files with 11 additions and 0 deletions

View File

@ -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;