1 \section{\class{wxBitmap
}}\label{wxbitmap
}
3 %\overview{Overview}{wxbitmapoverview}
5 This class encapsulates the concept of a platform-dependent bitmap,
6 either monochrome or colour.
8 \wxheading{Derived from
}
10 \helpref{wxGDIObject
}{wxgdiobject
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
17 \wxheading{Predefined objects
}
25 \helpref{wxBitmap overview
}{wxbitmapoverview
},
26 \helpref{supported bitmap file formats
}{supportedbitmapformats
},
27 \helpref{wxDC::Blit
}{wxdcblit
},
28 \helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
},
\helpref{wxBitmap
}{wxbitmap
},
29 \helpref{wxMemoryDC
}{wxmemorydc
}
31 \latexignore{\rtfignore{\wxheading{Members
}}}
33 \membersection{wxBitmap::wxBitmap
}\label{wxbitmapconstr
}
35 \func{}{wxBitmap
}{\void}
39 \func{}{wxBitmap
}{\param{const wxBitmap\&
}{bitmap
}}
43 \func{}{wxBitmap
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
45 Creates a bitmap from the given data which is interpreted in platform-dependent
48 \func{}{wxBitmap
}{\param{const char
}{ bits
[]},
\param{int
}{ width
},
\param{int
}{ height
}\\
49 \param{int
}{ depth =
1}}
51 Creates a bitmap from an array of bits.
53 You should only use this function for monochrome bitmaps (
{\it depth
} 1) in
54 portable programs: in this case the
{\it bits
} parameter should contain an XBM
57 For other bit depths, the behaviour is platform dependent: under Windows, the
58 data is passed withotu any changes to the underlying
{\tt CreateBitmap()
} API.
59 Under other platforms, only monochrome bitmaps may be created using this
60 constructor and
\helpref{wxImage
}{wximage
} should be used for creating colour
61 bitmaps from static data.
63 \func{}{wxBitmap
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
65 Creates a new bitmap. A depth of -
1 indicates the depth of the current screen
66 or visual. Some platforms only support
1 for monochrome and -
1 for the current
69 \func{}{wxBitmap
}{\param{const char**
}{ bits
}}
71 Creates a bitmap from XPM data.
73 \func{}{wxBitmap
}{\param{const wxString\&
}{name
},
\param{long
}{ type
}}
75 Loads a bitmap from a file or resource.
77 \wxheading{Parameters
}
79 \docparam{bits
}{Specifies an array of pixel values.
}
81 \docparam{width
}{Specifies the width of the bitmap.
}
83 \docparam{height
}{Specifies the height of the bitmap.
}
85 \docparam{depth
}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
88 \docparam{name
}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
89 Its meaning is determined by the
{\it type
} parameter.
}
91 \docparam{type
}{May be one of the following:
95 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_BMP}}}{Load a Windows bitmap file.
}
96 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.
}
97 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_GIF}}}{Load a GIF bitmap file.
}
98 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_XBM}}}{Load an X bitmap file.
}
99 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_XPM}}}{Load an XPM bitmap file.
}
100 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_RESOURCE}}}{Load a Windows resource name.
}
103 The validity of these flags depends on the platform and wxWindows configuration.
104 If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
105 XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
106 Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
108 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can, which currently include
109 wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_TIF, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX,
110 and wxBITMAP
\_TYPE\_PNM. Of course, you must have wxImage handlers loaded.
}
114 The first form constructs a bitmap object with no data; an assignment or another member function such as Create
115 or LoadFile must be called subsequently.
117 The second and third forms provide copy constructors. Note that these do not copy the
118 bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
119 very efficient operations.
121 The fourth form constructs a bitmap from data whose type and value depends on
122 the value of the
{\it type
} argument.
124 The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
127 The sixth form constructs a new bitmap.
129 The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
130 to incorporate this feature.
132 To use this constructor, you must first include an XPM file. For
133 example, assuming that the file
{\tt mybitmap.xpm
} contains an XPM array
134 of character pointers called mybitmap:
137 #include "mybitmap.xpm"
141 wxBitmap *bitmap = new wxBitmap(mybitmap);
144 The eighth form constructs a bitmap from a file or resource.
{\it name
} can refer
145 to a resource name under MS Windows, or a filename under MS Windows and X.
147 Under Windows,
{\it type
} defaults to wxBITMAP
\_TYPE\_BMP\_RESOURCE.
148 Under X,
{\it type
} defaults to wxBITMAP
\_TYPE\_XPM.
152 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
154 \pythonnote{Constructors supported by wxPython are:
\par
155 \indented{2cm
}{\begin{twocollist
}
156 \twocolitem{{\bf wxBitmap(name, flag)
}}{Loads a bitmap from a file
}
157 \twocolitem{{\bf wxBitmapFromData(data, type, width, height, depth=
1)
}}{Creates
158 a bitmap from the given data, which can be of arbitrary type.
}
159 \twocolitem{{\bf wxNoRefBitmap(name, flag)
}}{This one won't own the
160 reference, so Python won't call the destructor, this is good for toolbars
161 and such where the parent will manage the bitmap.
}
162 \twocolitem{{\bf wxEmptyBitmap(width, height, depth = -
1)
}}{Creates an
163 empty bitmap with the given specifications
}
167 \membersection{wxBitmap::
\destruct{wxBitmap
}}
169 \func{}{\destruct{wxBitmap
}}{\void}
171 Destroys the wxBitmap object and possibly the underlying bitmap data.
172 Because reference counting is used, the bitmap may not actually be
173 destroyed at this point - only when the reference count is zero will the
176 If the application omits to delete the bitmap explicitly, the bitmap will be
177 destroyed automatically by wxWindows when the application exits.
179 Do not delete a bitmap that is selected into a memory device context.
181 \membersection{wxBitmap::AddHandler
}\label{wxbitmapaddhandler
}
183 \func{static void
}{AddHandler
}{\param{wxBitmapHandler*
}{ handler
}}
185 Adds a handler to the end of the static list of format handlers.
187 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
188 of a given handler class in an application session.
}
192 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
194 \membersection{wxBitmap::CleanUpHandlers
}
196 \func{static void
}{CleanUpHandlers
}{\void}
198 Deletes all bitmap handlers.
200 This function is called by wxWindows on exit.
202 \membersection{wxBitmap::Create
}\label{wxbitmapcreate
}
204 \func{virtual bool
}{Create
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
206 Creates a fresh bitmap. If the final argument is omitted, the display depth of
209 \func{virtual bool
}{Create
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
211 Creates a bitmap from the given data, which can be of arbitrary type.
213 \wxheading{Parameters
}
215 \docparam{width
}{The width of the bitmap in pixels.
}
217 \docparam{height
}{The height of the bitmap in pixels.
}
219 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
221 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
223 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for a list
226 \wxheading{Return value
}
228 TRUE if the call succeeded, FALSE otherwise.
232 The first form works on all platforms. The portability of the second form depends on the
237 \helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
}
239 \membersection{wxBitmap::FindHandler
}
241 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
243 Finds the handler with the given name.
245 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{long
}{ bitmapType
}}
247 Finds the handler associated with the given extension and type.
249 \func{static wxBitmapHandler*
}{FindHandler
}{\param{long
}{bitmapType
}}
251 Finds the handler associated with the given bitmap type.
253 \docparam{name
}{The handler name.
}
255 \docparam{extension
}{The file extension, such as ``bmp".
}
257 \docparam{bitmapType
}{The bitmap type, such as wxBITMAP
\_TYPE\_BMP.
}
259 \wxheading{Return value
}
261 A pointer to the handler if found, NULL otherwise.
265 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
267 \membersection{wxBitmap::GetDepth
}
269 \constfunc{int
}{GetDepth
}{\void}
271 Gets the colour depth of the bitmap. A value of
1 indicates a
274 \membersection{wxBitmap::GetHandlers
}
276 \func{static wxList\&
}{GetHandlers
}{\void}
278 Returns the static list of bitmap format handlers.
282 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
284 \membersection{wxBitmap::GetHeight
}\label{wxbitmapgetheight
}
286 \constfunc{int
}{GetHeight
}{\void}
288 Gets the height of the bitmap in pixels.
290 \membersection{wxBitmap::GetPalette
}\label{wxbitmapgetpalette
}
292 \constfunc{wxPalette*
}{GetPalette
}{\void}
294 Gets the associated palette (if any) which may have been loaded from a file
295 or set for the bitmap.
299 \helpref{wxPalette
}{wxpalette
}
301 \membersection{wxBitmap::GetMask
}\label{wxbitmapgetmask
}
303 \constfunc{wxMask*
}{GetMask
}{\void}
305 Gets the associated mask (if any) which may have been loaded from a file
306 or set for the bitmap.
310 \helpref{wxBitmap::SetMask
}{wxbitmapsetmask
},
\helpref{wxMask
}{wxmask
}
312 \membersection{wxBitmap::GetWidth
}\label{wxbitmapgetwidth
}
314 \constfunc{int
}{GetWidth
}{\void}
316 Gets the width of the bitmap in pixels.
320 \helpref{wxBitmap::GetHeight
}{wxbitmapgetheight
}
322 \membersection{wxBitmap::GetSubBitmap
}\label{wxbitmapgetsubbitmap
}
324 \constfunc{wxBitmap
}{GetSubBitmap
}{\param{const wxRect\&
}{rect
}}
326 Returns a sub bitmap of the current one as long as the rect belongs entirely to
327 the bitmap. This function preserves bit depth and mask information.
329 \membersection{wxBitmap::InitStandardHandlers
}
331 \func{static void
}{InitStandardHandlers
}{\void}
333 Adds the standard bitmap format handlers, which, depending on wxWindows
334 configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
336 This function is called by wxWindows on startup.
340 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
342 \membersection{wxBitmap::InsertHandler
}
344 \func{static void
}{InsertHandler
}{\param{wxBitmapHandler*
}{ handler
}}
346 Adds a handler at the start of the static list of format handlers.
348 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
349 of a given handler class in an application session.
}
353 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
355 \membersection{wxBitmap::LoadFile
}\label{wxbitmaploadfile
}
357 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
359 Loads a bitmap from a file or resource.
361 \wxheading{Parameters
}
363 \docparam{name
}{Either a filename or a Windows resource name.
364 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
366 \docparam{type
}{One of the following values:
370 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
371 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
372 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
373 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
374 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
377 The validity of these flags depends on the platform and wxWindows configuration.
379 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can
380 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX, wxBITMAP
\_TYPE\_PNM).
381 (Of course you must have wxImage handlers loaded.)
}
383 \wxheading{Return value
}
385 TRUE if the operation succeeded, FALSE otherwise.
389 A palette may be associated with the bitmap if one exists (especially for
390 colour Windows bitmaps), and if the code supports it. You can check
391 if one has been created by using the
\helpref{GetPalette
}{wxbitmapgetpalette
} member.
395 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}
397 \membersection{wxBitmap::Ok
}\label{wxbitmapok
}
399 \constfunc{bool
}{Ok
}{\void}
401 Returns TRUE if bitmap data is present.
403 \membersection{wxBitmap::RemoveHandler
}
405 \func{static bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
407 Finds the handler with the given name, and removes it. The handler
410 \docparam{name
}{The handler name.
}
412 \wxheading{Return value
}
414 TRUE if the handler was found and removed, FALSE otherwise.
418 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
420 \membersection{wxBitmap::SaveFile
}\label{wxbitmapsavefile
}
422 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
424 Saves a bitmap in the named file.
426 \wxheading{Parameters
}
428 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
430 \docparam{type
}{One of the following values:
434 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Save a Windows bitmap file.
}
435 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Save a GIF bitmap file.
}
436 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Save an X bitmap file.
}
437 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Save an XPM bitmap file.
}
440 The validity of these flags depends on the platform and wxWindows configuration.
442 In addition, wxBitmap can save all formats that
\helpref{wxImage
}{wximage
} can
443 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG).
444 (Of course you must have wxImage handlers loaded.)
}
446 \docparam{palette
}{An optional palette used for saving the bitmap.
}
447 % TODO: this parameter should
448 %probably be eliminated; instead the app should set the palette before saving.
450 \wxheading{Return value
}
452 TRUE if the operation succeeded, FALSE otherwise.
456 Depending on how wxWindows has been configured, not all formats may be available.
460 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
462 \membersection{wxBitmap::SetDepth
}\label{wxbitmapsetdepth
}
464 \func{void
}{SetDepth
}{\param{int
}{depth
}}
466 Sets the depth member (does not affect the bitmap data).
468 \wxheading{Parameters
}
470 \docparam{depth
}{Bitmap depth.
}
472 \membersection{wxBitmap::SetHeight
}\label{wxbitmapsetheight
}
474 \func{void
}{SetHeight
}{\param{int
}{height
}}
476 Sets the height member (does not affect the bitmap data).
478 \wxheading{Parameters
}
480 \docparam{height
}{Bitmap height in pixels.
}
482 \membersection{wxBitmap::SetMask
}\label{wxbitmapsetmask
}
484 \func{void
}{SetMask
}{\param{wxMask*
}{mask
}}
486 Sets the mask for this bitmap.
490 The bitmap object owns the mask once this has been called.
494 \helpref{wxBitmap::GetMask
}{wxbitmapgetmask
},
\helpref{wxMask
}{wxmask
}
496 \membersection{wxBitmap::SetOk
}
498 \func{void
}{SetOk
}{\param{int
}{isOk
}}
500 Sets the validity member (does not affect the bitmap data).
502 \wxheading{Parameters
}
504 \docparam{isOk
}{Validity flag.
}
506 \membersection{wxBitmap::SetPalette
}\label{wxbitmapsetpalette
}
508 \func{void
}{SetPalette
}{\param{wxPalette*
}{palette
}}
510 Sets the associated palette: it will be deleted in the wxBitmap
511 destructor, so if you do not wish it to be deleted automatically,
512 reset the palette to NULL before the bitmap is deleted.
514 \wxheading{Parameters
}
516 \docparam{palette
}{The palette to set.
}
520 The bitmap object owns the palette once this has been called.
524 \helpref{wxPalette
}{wxpalette
}
526 \membersection{wxBitmap::SetWidth
}
528 \func{void
}{SetWidth
}{\param{int
}{width
}}
530 Sets the width member (does not affect the bitmap data).
532 \wxheading{Parameters
}
534 \docparam{width
}{Bitmap width in pixels.
}
536 \membersection{wxBitmap::operator $=$
}
538 \func{wxBitmap\&
}{operator $=$
}{\param{const wxBitmap\&
}{bitmap
}}
540 Assignment operator. This operator does not copy any data, but instead
541 passes a pointer to the data in
{\it bitmap
} and increments a reference
542 counter. It is a fast operation.
544 \wxheading{Parameters
}
546 \docparam{bitmap
}{Bitmap to assign.
}
548 \wxheading{Return value
}
550 Returns 'this' object.
552 \membersection{wxBitmap::operator $==$
}
554 \func{bool
}{operator $==$
}{\param{const wxBitmap\&
}{bitmap
}}
556 Equality operator. This operator tests whether the internal data pointers are
559 \wxheading{Parameters
}
561 \docparam{bitmap
}{Bitmap to compare with 'this'
}
563 \wxheading{Return value
}
565 Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
567 \membersection{wxBitmap::operator $!=$
}
569 \func{bool
}{operator $!=$
}{\param{const wxBitmap\&
}{bitmap
}}
571 Inequality operator. This operator tests whether the internal data pointers are
572 unequal (a fast test).
574 \wxheading{Parameters
}
576 \docparam{bitmap
}{Bitmap to compare with 'this'
}
578 \wxheading{Return value
}
580 Returns TRUE if the bitmaps were unequal, FALSE otherwise.
582 \section{\class{wxBitmapHandler
}}\label{wxbitmaphandler
}
584 \overview{Overview
}{wxbitmapoverview
}
586 This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
587 It is used within wxBitmap and is not normally seen by the application.
589 If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
590 and add the handler using
\helpref{wxBitmap::AddHandler
}{wxbitmapaddhandler
} in your
591 application initialisation.
593 \wxheading{Derived from
}
595 \helpref{wxObject
}{wxobject
}
597 \wxheading{Include files
}
603 \helpref{wxBitmap
}{wxbitmap
},
\helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
}
605 \latexignore{\rtfignore{\wxheading{Members
}}}
607 \membersection{wxBitmapHandler::wxBitmapHandler
}\label{wxbitmaphandlerconstr
}
609 \func{}{wxBitmapHandler
}{\void}
611 Default constructor. In your own default constructor, initialise the members
612 m
\_name, m
\_extension and m
\_type.
614 \membersection{wxBitmapHandler::
\destruct{wxBitmapHandler
}}
616 \func{}{\destruct{wxBitmapHandler
}}{\void}
618 Destroys the wxBitmapHandler object.
620 \membersection{wxBitmapHandler::Create
}
622 \func{virtual bool
}{Create
}{\param{wxBitmap*
}{bitmap
},
\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
624 Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object
{\it bitmap
} is
625 manipulated by this function.
627 \wxheading{Parameters
}
629 \docparam{bitmap
}{The wxBitmap object.
}
631 \docparam{width
}{The width of the bitmap in pixels.
}
633 \docparam{height
}{The height of the bitmap in pixels.
}
635 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
637 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
639 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmapHandler::wxBitmapHandler
}{wxbitmapconstr
} for a list
642 \wxheading{Return value
}
644 TRUE if the call succeeded, FALSE otherwise (the default).
646 \membersection{wxBitmapHandler::GetName
}
648 \constfunc{wxString
}{GetName
}{\void}
650 Gets the name of this handler.
652 \membersection{wxBitmapHandler::GetExtension
}
654 \constfunc{wxString
}{GetExtension
}{\void}
656 Gets the file extension associated with this handler.
658 \membersection{wxBitmapHandler::GetType
}
660 \constfunc{long
}{GetType
}{\void}
662 Gets the bitmap type associated with this handler.
664 \membersection{wxBitmapHandler::LoadFile
}\label{wxbitmaphandlerloadfile
}
666 \func{bool
}{LoadFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
668 Loads a bitmap from a file or resource, putting the resulting data into
{\it bitmap
}.
670 \wxheading{Parameters
}
672 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
674 \docparam{name
}{Either a filename or a Windows resource name.
675 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
677 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
679 \wxheading{Return value
}
681 TRUE if the operation succeeded, FALSE otherwise.
685 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
686 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
687 \helpref{wxBitmapHandler::SaveFile
}{wxbitmaphandlersavefile
}
689 \membersection{wxBitmapHandler::SaveFile
}\label{wxbitmaphandlersavefile
}
691 \func{bool
}{SaveFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
693 Saves a bitmap in the named file.
695 \wxheading{Parameters
}
697 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
699 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
701 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
703 \docparam{palette
}{An optional palette used for saving the bitmap.
}
705 \wxheading{Return value
}
707 TRUE if the operation succeeded, FALSE otherwise.
711 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
712 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
713 \helpref{wxBitmapHandler::LoadFile
}{wxbitmaphandlerloadfile
}
715 \membersection{wxBitmapHandler::SetName
}
717 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
719 Sets the handler name.
721 \wxheading{Parameters
}
723 \docparam{name
}{Handler name.
}
725 \membersection{wxBitmapHandler::SetExtension
}
727 \func{void
}{SetExtension
}{\param{const wxString\&
}{extension
}}
729 Sets the handler extension.
731 \wxheading{Parameters
}
733 \docparam{extension
}{Handler extension.
}
735 \membersection{wxBitmapHandler::SetType
}
737 \func{void
}{SetType
}{\param{long
}{type
}}
739 Sets the handler type.
741 \wxheading{Parameters
}
743 \docparam{name
}{Handler type.
}