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:
@@ -142,12 +142,13 @@ corresponding dimensions of the \arg{size}.
|
|||||||
|
|
||||||
\membersection{wxSize::Scale}\label{wxsizescale}
|
\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.
|
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
|
If you want to scale both dimensions by the same factor you can also use
|
||||||
the \helpref{operator *=}{wxsizeoperators}
|
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}
|
\membersection{wxSize::Set}\label{wxsizeset}
|
||||||
|
@@ -239,8 +239,8 @@ public:
|
|||||||
void DecBy(int d) { DecBy(d, d); }
|
void DecBy(int d) { DecBy(d, d); }
|
||||||
|
|
||||||
|
|
||||||
void Scale(float xscale, float yscale)
|
wxSize& Scale(float xscale, float yscale)
|
||||||
{ x = (int)(x*xscale); y = (int)(y*yscale); }
|
{ x = (int)(x*xscale); y = (int)(y*yscale); return *this; }
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
void Set(int xx, int yy) { x = xx; y = yy; }
|
void Set(int xx, int yy) { x = xx; y = yy; }
|
||||||
|
Reference in New Issue
Block a user