X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f690fb046b8a685f8ef35657c2f305ca0e1481a0..e195c8c95fb154d035bab400952fc81c62439549:/docs/latex/wx/bitmap.tex diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index 4e5f5c4575..6428ab392c 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -74,6 +74,23 @@ Creates a bitmap from XPM data. Loads a bitmap from a file or resource. +\func{}{wxBitmap}{\param{const wxImage\&}{ img}, \param{int}{ depth = -1}} + +Creates bitmap object from the image. This has to be done +to actually display an image as you cannot draw an image directly on a window. +The resulting bitmap will use the provided colour depth (or that of the +current system if depth is -1) which entails that a colour reduction has +to take place. + +When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube created +on program start-up to look up colors. This ensures a very fast conversion, but +the image quality won't be perfect (and could be better for photo images using more +sophisticated dithering algorithms). + +On Windows, if there is a palette present (set with SetPalette), it will be used when +creating the wxBitmap (most useful in 8-bit display mode). On other platforms, +the palette is currently ignored. + \wxheading{Parameters} \docparam{bits}{Specifies an array of pixel values.} @@ -109,6 +126,8 @@ In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can, wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_TIF, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX, and wxBITMAP\_TYPE\_PNM. Of course, you must have wxImage handlers loaded. } +\docparam{img}{Platform-independent wxImage object.} + \wxheading{Remarks} The first form constructs a bitmap object with no data; an assignment or another member function such as Create @@ -207,6 +226,14 @@ Deletes all bitmap handlers. This function is called by wxWindows on exit. +\membersection{wxBitmap::ConvertToImage}\label{wxbitmapconverttoimage} + +\func{wxImage}{ConvertToImage}{\void} + +Creates an image from a platform-dependent bitmap. This preserves +mask information so that bitmaps and images can be converted back +and forth without loss in that respect. + \membersection{wxBitmap::Create}\label{wxbitmapcreate} \func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}