added wxDC::ResetBoundingBox(), documented it and CalcBoundingBox() too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,6 +108,18 @@ See \helpref{wxMemoryDC}{wxmemorydc} for typical usage.
|
|||||||
|
|
||||||
\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask}
|
\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask}
|
||||||
|
|
||||||
|
\membersection{wxDC::CalcBoundingBox}\label{wxdccalcboundingbox}
|
||||||
|
|
||||||
|
\func{void}{CalcBoundingBox}{\param{wxCoord }{x}, \param{wxCoord }{y}}
|
||||||
|
|
||||||
|
Adds the specified point to the bounding box which can be retrieved with
|
||||||
|
\helpref{MinX}{wxdcminx}, \helpref{MaxX}{wxdcmaxx} and
|
||||||
|
\helpref{MinY}{wxdcminy}, \helpref{MaxY}{wxdcmaxy} functions.
|
||||||
|
|
||||||
|
\wxheading{See also}
|
||||||
|
|
||||||
|
\helpref{ResetBoundingBox}{wxdcresetboundingbox}
|
||||||
|
|
||||||
\membersection{wxDC::Clear}\label{wxdcclear}
|
\membersection{wxDC::Clear}\label{wxdcclear}
|
||||||
|
|
||||||
\func{void}{Clear}{\void}
|
\func{void}{Clear}{\void}
|
||||||
@@ -579,6 +591,17 @@ Gets the minimum vertical extent used in drawing commands so far.
|
|||||||
|
|
||||||
Returns TRUE if the DC is ok to use.
|
Returns TRUE if the DC is ok to use.
|
||||||
|
|
||||||
|
\membersection{wxDC::ResetBoundingBox}\label{wxdcresetboundingbox}
|
||||||
|
|
||||||
|
\func{void}{ResetBoundingBox}{\void}
|
||||||
|
|
||||||
|
Resets the bounding box: after a call to this function, the bounding box
|
||||||
|
doesn't contain anything.
|
||||||
|
|
||||||
|
\wxheading{See also}
|
||||||
|
|
||||||
|
\helpref{CalcBoundingBox}{wxdccalcboundingbox}
|
||||||
|
|
||||||
\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
|
\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
|
||||||
|
|
||||||
\func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
|
\func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
|
||||||
|
@@ -48,9 +48,8 @@ public:
|
|||||||
{
|
{
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
m_ok = TRUE;
|
m_ok = TRUE;
|
||||||
m_isBBoxValid = FALSE;
|
|
||||||
|
|
||||||
m_minX = m_minY = m_maxX = m_maxY = 0;
|
ResetBoundingBox();
|
||||||
|
|
||||||
m_signX = m_signY = 1;
|
m_signX = m_signY = 1;
|
||||||
|
|
||||||
@@ -419,6 +418,13 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ResetBoundingBox()
|
||||||
|
{
|
||||||
|
m_isBBoxValid = FALSE;
|
||||||
|
|
||||||
|
m_minX = m_maxX = m_minY = m_maxY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the final bounding box of the PostScript or Metafile picture.
|
// Get the final bounding box of the PostScript or Metafile picture.
|
||||||
wxCoord MinX() const { return m_minX; }
|
wxCoord MinX() const { return m_minX; }
|
||||||
wxCoord MaxX() const { return m_maxX; }
|
wxCoord MaxX() const { return m_maxX; }
|
||||||
|
Reference in New Issue
Block a user