toolsmodel.h (29e147be) toolsmodel.h (aac89519)
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL
4 * FILE: base/applications/mspaint/toolsmodel.h
5 * PURPOSE: Keep track of tool parameters, notify listeners
6 * PROGRAMMERS: Benedikt Freisen
7 */
8

--- 118 unchanged lines hidden (view full) ---

127{
128 return xy * toolsModel.GetZoom() / 1000;
129}
130
131static inline int UnZoomed(int xy)
132{
133 return xy * 1000 / toolsModel.GetZoom();
134}
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL
4 * FILE: base/applications/mspaint/toolsmodel.h
5 * PURPOSE: Keep track of tool parameters, notify listeners
6 * PROGRAMMERS: Benedikt Freisen
7 */
8

--- 118 unchanged lines hidden (view full) ---

127{
128 return xy * toolsModel.GetZoom() / 1000;
129}
130
131static inline int UnZoomed(int xy)
132{
133 return xy * 1000 / toolsModel.GetZoom();
134}
135
136static inline void Zoomed(POINT& pt)
137{
138 pt.x = Zoomed(pt.x);
139 pt.y = Zoomed(pt.y);
140}
141
142static inline void Zoomed(RECT& rc)
143{
144 rc.left = Zoomed(rc.left);
145 rc.top = Zoomed(rc.top);
146 rc.right = Zoomed(rc.right);
147 rc.bottom = Zoomed(rc.bottom);
148}
149
150static inline void UnZoomed(POINT& pt)
151{
152 pt.x = UnZoomed(pt.x);
153 pt.y = UnZoomed(pt.y);
154}
155
156static inline void UnZoomed(RECT& rc)
157{
158 rc.left = UnZoomed(rc.left);
159 rc.top = UnZoomed(rc.top);
160 rc.right = UnZoomed(rc.right);
161 rc.bottom = UnZoomed(rc.bottom);
162}