FRM's small wxSize::Scale enhancement.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-11-01 12:21:36 +00:00
parent 49fa1dbb96
commit c5bad6049f
2 changed files with 4 additions and 3 deletions

View File

@@ -142,12 +142,13 @@ corresponding dimensions of the \arg{size}.
\membersection{wxSize::Scale}\label{wxsizescale}
\func{void}{Scale}{\param{float}{ xscale}, \param{float}{ yscale}}
\func{wxSize\&}{Scale}{\param{float}{ xscale}, \param{float}{ yscale}}
Scales the dimensions of this object by the given factors.
If you want to scale both dimensions by the same factor you can also use
the \helpref{operator *=}{wxsizeoperators}
Returns a reference to this object (so that you can concatenate other operations in the same line).
\membersection{wxSize::Set}\label{wxsizeset}

View File

@@ -239,8 +239,8 @@ public:
void DecBy(int d) { DecBy(d, d); }
void Scale(float xscale, float yscale)
{ x = (int)(x*xscale); y = (int)(y*yscale); }
wxSize& Scale(float xscale, float yscale)
{ x = (int)(x*xscale); y = (int)(y*yscale); return *this; }
// accessors
void Set(int xx, int yy) { x = xx; y = yy; }