⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 metafile.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxMetafile}}\label{wxmetafile}A {\bf wxMetafile} represents the MS Windows metafile object, so metafileoperations have no effect in X. In wxWidgets, only sufficient functionalityhas been provided for copying a graphic to the clipboard; this may be extendedin a future version. Presently, the only way of creating a metafileis to use a wxMetafileDC.\wxheading{Derived from}\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/metafile.h>\wxheading{See also}\helpref{wxMetafileDC}{wxmetafiledc}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxMetafile::wxMetafile}\label{wxmetafilector}\func{}{wxMetafile}{\param{const wxString\& }{filename = ""}}Constructor. If a filename is given, the Windows disk metafile isread in. Check whether this was performed successfully byusing the \helpref{wxMetafile:IsOk}{wxmetafileisok} member.\membersection{wxMetafile::\destruct{wxMetafile}}\label{wxmetafiledtor}\func{}{\destruct{wxMetafile}}{\void}Destructor.See \helpref{reference-counted object destruction}{refcountdestruct} for more info.\membersection{wxMetafile::IsOk}\label{wxmetafileisok}\func{bool}{Ok}{\void}Returns true if the metafile is valid.\membersection{wxMetafile::Play}\label{wxmetafileplay}\func{bool}{Play}{\param{wxDC *}{dc}}Plays the metafile into the given device context, returningtrue if successful.\membersection{wxMetafile::SetClipboard}\label{wxmetafilesetclipboard}\func{bool}{SetClipboard}{\param{int}{ width = 0}, \param{int}{ height = 0}}Passes the metafile data to the clipboard. The metafile can no longer beused for anything, but the wxMetafile object must still be destroyed bythe application.Below is a example of metafile, metafile device context and clipboard usefrom the {\tt hello.cpp} example. Note the way the metafile dimensionsare passed to the clipboard, making use of the device context's abilityto keep track of the maximum extent of drawing commands.\begin{verbatim}  wxMetafileDC dc;  if (dc.Ok())  {    Draw(dc, false);    wxMetafile *mf = dc.Close();    if (mf)    {      bool success = mf->SetClipboard((int)(dc.MaxX() + 10), (int)(dc.MaxY() + 10));      delete mf;    }  }\end{verbatim}\section{\class{wxMetafileDC}}\label{wxmetafiledc}This is a type of device context that allows a metafile object to becreated (Windows only), and has most of the characteristics of a normal\rtfsp{\bf wxDC}. The \helpref{wxMetafileDC::Close}{wxmetafiledcclose} member must be called after drawing into thedevice context, to return a metafile. The only purpose for this atpresent is to allow the metafile to be copied to the clipboard (see \helpref{wxMetafile}{wxmetafile}).Adding metafile capability to an application should be easy if youalready write to a wxDC; simply pass the wxMetafileDC to your drawingfunction instead. You may wish to conditionally compile this code so itis not compiled under X (although no harm will result if you leave itin).Note that a metafile saved to disk is in standard Windows metafile format,and cannot be imported into most applications. To make it importable,call the function \helpref{::wxMakeMetafilePlaceable}{wxmakemetafileplaceable} afterclosing your disk-based metafile device context.\wxheading{Derived from}\helpref{wxDC}{wxdc}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/metafile.h>\wxheading{See also}\helpref{wxMetafile}{wxmetafile}, \helpref{wxDC}{wxdc}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxMetafileDC::wxMetafileDC}\label{wxmetafiledcctor}\func{}{wxMetafileDC}{\param{const wxString\& }{filename = ""}}Constructor. If no filename is passed, the metafile is createdin memory.\membersection{wxMetafileDC::\destruct{wxMetafileDC}}\label{wxmetafiledcdtor}\func{}{\destruct{wxMetafileDC}}{\void}Destructor.\membersection{wxMetafileDC::Close}\label{wxmetafiledcclose}\func{wxMetafile *}{Close}{\void}This must be called after the device context is finished with. Ametafile is returned, and ownership of it passes to the callingapplication (so it should be destroyed explicitly).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -