14#if defined(__BORLANDC__)
72 height <<
"x" <<
planes <<
")");
76 dec << width <<
"x" << height <<
"x" <<
planes <<
")." <<
hex);
89 <<
" from BITMAP @" <<
static_cast<const void*
>(&
bitmap) <<
".");
92#if defined(OWL5_COMPAT)
121 "x" << height <<
") for " <<
static_cast<void*
>(dc.
GetHDC()));
126 "x" << height <<
") for " <<
static_cast<void*
>(dc.
GetHDC()));
133 dec << width <<
"x" << height <<
") for " <<
static_cast<void*
>(dc.
GetHDC()) <<
".");
137 dec << width <<
"x" << height <<
") for " <<
static_cast<void*
>(dc.
GetHDC()) <<
".");
153 WARNX(
OwlGDI, !
Handle, 0,
"Cannot create bitmap from DIB " <<
static_cast<void*
>(
dib.GetHandle())
154 <<
" for " <<
static_cast<void*
>(dc.
GetHDC()));
158 " from DIB for " <<
static_cast<void*
>(dc.
GetHDC()) <<
".");
169 " from " <<
static_cast<void*
>(
instance));
213 memDC.SelectObject(*
this);
216 memDC.PatBlt(0, 0, size.cx, size.cy);
222 " from metafile @" << (
void*)&
metaFile <<
".");
235 else if (
NColors(
dib.GetInfo()->bmiHeader.biBitCount) > 0)
243 static_cast<const uint8*
>(
dib.GetBits()),
251 (
void*)&
dib <<
" and palette @" << (
void*)
palette <<
".");
270 if (!
r)
throw TXOwl(
_T(
"TBitmap::GetObject failed"));
326 return bm.bmBitsPixel;
337 if (!
ok)
throw TXOwl(
_T(
"TBitmap::GetBitmapDimension failed"));
370 static_cast<const uint8 *
>(
dib.GetBits()),
392 if (
bm.bmPlanes != 1 ||
bm.bmBitsPixel != 1) {
405 memDC2.SelectObject(*
this);
#define WARNX(group, condition, level, message)
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
TBitmap is the GDI bitmap class derived from TGdiObject.
void ToClipboard(TClipboard &clipboard)
Put a device-dependent bitmap on the clipboard as a (DD)BITMAP.
void Create(const TDib &dib, const TPalette &palette)
Create a bitmap & get its handle, given a dib and a palette Used by ctors here and in derived classes...
int Planes() const
Returns the number of planes in this bitmap.
TSize Size() const
The width and height of the bitmap in pixels.
int Width() const
Returns the width of this bitmap using GDI's GetObject.
TSize GetBitmapDimension() const
Functional-style overload.
int Height() const
Returns the height of this bitmap using GDI's GetObject.
int BitsPixel() const
Returns the number of bits per pixel in this bitmap.
The clipboard class encapsulates the methods for the clipboard object of Windows.
HANDLE SetClipboardData(uint format, HANDLE handle)
Copy the data onto the clipboard in the format.
TDC is the root class for GDI DC wrappers.
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
int RealizePalette()
Maps to the system palette the logical palette entries selected into this DC.
HDC GetHDC() const
Return the handle of the device context.
Pseudo-GDI object Device Independent Bitmap (DIB) class.
GdiObject is the root, pseudo-abstract base class for ObjectWindows' GDI (Graphics Device Interface) ...
static void RefInc(HANDLE handle)
Increments by 1 the reference count of the object associated with the given handle.
void CheckValid(uint resId=IDS_GDIFAILURE)
static void RefRemove(HANDLE handle)
Removes the reference entry to the object with the given handle.
bool ShouldDelete
Should object delete GDI handle in dtor?
static void RefAdd(HANDLE handle, TType type)
RefAdd adds a reference entry for the object with the given handle and type.
HANDLE Handle
GDI handle of this object.
A device context (DC) class derived from TCreatedDC, TMemoryDC provides access to a memory DC.
TPalette is the GDI Palette class derived from TGdiObject.
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
Derived from TWindowDC, TScreenDC is a DC class that provides direct access to the screen bitmap.
The tagSIZE struct is defined as.
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition of classes for clipboard Encapsulation.
Definition of abstract GDI object class and derived classes.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core)
long NColors(uint16 bitCount)
Functions to convert number of bits to number of palette colors and back, and build an RGB COLORREF.
Classes for window system structure and type encapsulation.