~ubuntu-branches/ubuntu/wily/wxwidgets3.0/wily-proposed

« back to all changes in this revision

Viewing changes to include/wx/geometry.h

  • Committer: Package Import Robot
  • Author(s): Olly Betts
  • Date: 2014-06-18 12:42:22 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140618124222-y7t2vpsije1cesxy
Tags: 3.0.1-1
* New upstream release
  + Incorporates most of the patches we were carrying - only one left is:
    wx-config-conditionalise-webview-in-std.patch
* Drop versioning of dependencies from run-time libraries to wx-common -
  this will make the transition to the next wx version harder, and also
  makes backporting to wheezy more work.
* Mark -dbg packages as "Multi-Arch: same".
* Correct short descriptions of the webview packages to not just be
  copies of the corresponding media package's short description.
* Wrap 81 character line in package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
88
88
inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
89
89
inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
 
90
inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt);
90
91
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
 
92
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n);
91
93
inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
92
94
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
 
95
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n);
93
96
 
94
97
inline wxPoint2DInt::wxPoint2DInt()
95
98
{
202
205
 
203
206
inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt)
204
207
{
205
 
    m_x = m_x + pt.m_x;
206
 
    m_y = m_y + pt.m_y;
 
208
    m_x = m_x * pt.m_x;
 
209
    m_y = m_y * pt.m_y;
207
210
    return *this;
208
211
}
209
212
 
210
213
inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt)
211
214
{
212
 
    m_x = m_x - pt.m_x;
213
 
    m_y = m_y - pt.m_y;
 
215
    m_x = m_x / pt.m_x;
 
216
    m_y = m_y / pt.m_y;
214
217
    return *this;
215
218
}
216
219
 
247
250
 
248
251
inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt)
249
252
{
250
 
    return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
 
253
    return wxPoint2DInt( static_cast<wxInt32>(pt.m_x * n) ,
 
254
        static_cast<wxInt32>(pt.m_y * n) );
251
255
}
252
256
 
253
257
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n)
257
261
 
258
262
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n)
259
263
{
260
 
    return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
 
264
    return wxPoint2DInt( static_cast<wxInt32>(pt.m_x * n) ,
 
265
        static_cast<wxInt32>(pt.m_y * n) );
261
266
}
262
267
 
263
268
inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
272
277
 
273
278
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n)
274
279
{
275
 
    return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) );
 
280
    return wxPoint2DInt( static_cast<wxInt32>(pt.m_x / n) ,
 
281
        static_cast<wxInt32>(pt.m_y / n) );
276
282
}
277
283
 
278
284
// wxPoint2Ds represent a point or a vector in a 2d coordinate system