9#if !defined(OWL_GDIOBJEC_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
79 operator HGDIOBJ()
const;
81 int GetObject(
int count,
void *
object)
const;
82 bool operator ==(
const TGdiObject& other)
const;
107 static TObjInfo* RefFind(HANDLE
object);
108 static void RefAdd(HANDLE handle, TType type);
109 static void RefRemove(HANDLE handle);
110 static void RefInc(HANDLE handle);
111 static void RefDec(HANDLE handle,
bool wantDelete);
112 static int RefCount(HANDLE handle);
147 TPen(
const TColor& color,
int width=1,
int style=PS_SOLID);
148 TPen(
const LOGPEN& logPen);
158 operator HPEN()
const;
162#if defined(OWL5_COMPAT)
164 TPen(
const LOGPEN* logPen);
191 TBrush(
const LOGBRUSH& logBrush);
200 operator HBRUSH()
const;
204#if defined(OWL5_COMPAT)
206 TBrush(
const LOGBRUSH* logBrush);
207 bool GetObject(LOGBRUSH & logBrush)
const;
287 static HBRUSH Create(
const uint8 hatch[],
const TColor& fgColor,
const TColor& bgColor);
309 int height=0,
int width=0,
int escapement=0,
int orientation=0,
310 int weight=FW_NORMAL,
311 uint8 pitchAndFamily=DEFAULT_PITCH|FF_DONTCARE,
314 uint8 outputPrecision=OUT_DEFAULT_PRECIS,
315 uint8 clipPrecision=CLIP_DEFAULT_PRECIS,
316 uint8 quality=DEFAULT_QUALITY);
320 TFont(
int height,
int width,
int escapement=0,
int orientation=0,
321 int weight=FW_NORMAL,
324 uint8 outputPrecision=OUT_DEFAULT_PRECIS,
325 uint8 clipPrecision=CLIP_DEFAULT_PRECIS,
326 uint8 quality=DEFAULT_QUALITY,
327 uint8 pitchAndFamily=DEFAULT_PITCH|FF_DONTCARE,
330 TFont(
const LOGFONT& logFont);
336 operator HFONT()
const;
341 TEXTMETRIC GetTextMetrics(
TDC& dc)
const;
342 void GetTextMetrics(TEXTMETRIC& tm,
TDC& dc)
const;
346 TEXTMETRIC GetTextMetrics()
const;
347 void GetTextMetrics(TEXTMETRIC& tm)
const;
351 int GetHeight()
const;
352 int GetHeight(
TDC& dc)
const;
353 int GetAveWidth()
const;
354 int GetAveWidth(
TDC& dc)
const;
355 int GetMaxWidth()
const;
356 int GetMaxWidth(
TDC& dc)
const;
360 uint8 GetPitchAndFamily()
const;
362 LOGFONT GetObject()
const;
364#if defined(OWL5_COMPAT)
366 TFont(
const LOGFONT* logFont);
367 bool GetObject(LOGFONT& logFont)
const;
424 TPalette(
const LOGPALETTE& logPalette);
425 TPalette(
const PALETTEENTRY* entries,
int count);
435 {Init(&entries[0],
static_cast<int>(N));}
439 HPALETTE GetHandle()
const;
440 operator HPALETTE()
const;
444 bool ResizePalette(
uint numEntries);
445 void AnimatePalette(
uint start,
uint count,
const PALETTEENTRY * entries);
446 uint SetPaletteEntries(
uint16 start,
uint16 count,
const PALETTEENTRY * entries);
447 uint SetPaletteEntry(
uint16 index,
const PALETTEENTRY & entry);
448 uint GetPaletteEntries(
uint16 start,
uint16 count, PALETTEENTRY * entries)
const;
449 uint GetPaletteEntry(
uint16 index, PALETTEENTRY & entry)
const;
450 uint GetNearestPaletteIndex(
const TColor& color)
const;
451 bool GetObject(
uint16 & numEntries)
const;
452 uint16 GetNumEntries()
const;
457 bool UnrealizeObject();
461 bool Write(
const tchar * fileName);
463#if defined(OWL5_COMPAT)
465 TPalette(
const LOGPALETTE* logPalette);
471 void Create(
const BITMAPINFO * info,
uint flags);
474 bool Read(
const tchar * fileName);
498 void Init(
const PALETTEENTRY* entries,
int count);
521 TBitmap(
int width,
int height,
uint8 planes=1,
uint8 bitCount=1,
const void * bits=
nullptr);
523 TBitmap(
const TDC&,
int width,
int height,
bool discardable =
false);
534 operator HBITMAP()
const;
556#if defined(OWL5_COMPAT)
601 TRegion(
const TPoint* points,
const int* polyCounts,
int count,
int fillMode);
608 {Init(&points[0],
static_cast<int>(N), fillMode);}
617 {Init(points, &polyCounts[0],
static_cast<int>(N), fillMode);}
623 void SetRectRgn(
const TRect& rect);
627 HRGN GetHandle()
const;
628 operator HRGN()
const;
632 auto Release() -> HRGN;
636 bool operator ==(
const TRegion& other)
const;
637 bool operator !=(
const TRegion& other)
const;
638 bool Contains(
const TPoint& point)
const;
639 bool Touches(
const TRect& rect)
const;
640 int GetRgnBox(
TRect& box)
const;
641 TRect GetRgnBox()
const;
658 void Init(
const TPoint* points,
int count,
int fillMode);
659 void Init(
const TPoint* points,
const int* polyCounts,
int count,
int fillMode);
682 TIcon(HINSTANCE,
const TSize& size,
int planes,
int bitsPixel,
683 const void * andBits,
const void * xorBits);
685 TIcon(
const ICONINFO& iconInfo);
691 operator HICON()
const;
693 bool operator ==(
const TIcon& other)
const;
709#if defined(OWL5_COMPAT)
711 TIcon(
const ICONINFO* iconInfo);
742 const TSize& size,
void * andBits,
void * xorBits);
744 TCursor(
const ICONINFO& iconInfo);
750 operator HCURSOR()
const;
752 bool operator ==(
const TCursor& other)
const;
768#if defined(OWL5_COMPAT)
770 TCursor(
const ICONINFO* iconInfo);
809 explicit TDib(LPCTSTR filename);
811 explicit TDib(
TFile& file,
bool readFileHeader =
true);
812 explicit TDib(std::istream& is,
bool readFileHeader =
false);
818 bool operator ==(
const TDib& other)
const;
822 const BITMAPINFO *
GetInfo()
const;
836 operator HANDLE()
const;
838 operator const BITMAPINFO *()
const;
839 operator BITMAPINFO *();
840 operator const BITMAPINFOHEADER *()
const;
841 operator BITMAPINFOHEADER *();
877 bool Write(
TFile& file,
bool writeFileHeader =
false);
878 bool Write(std::ostream& os,
bool writeFileHeader =
false);
916 void MapUIColors(
uint mapColors,
const TColor* bkColor =
nullptr);
919 void MapToPalette(
const TPalette& pal);
925 virtual long Read(
void * buffer,
long size) = 0;
926 virtual void Skip(
long size) = 0;
930 virtual bool Write(
void * buffer,
long size) = 0;
948 bool Read(
TFile& file,
bool readFileHeader =
false);
949 bool Read(std::istream& is,
bool readFileHeader =
false);
954 virtual bool Read(
IFileIn& in,
bool readFileHeader =
false);
955 virtual bool Write(
IFileOut& out,
bool writeFileHeader =
false);
1028inline TGdiObject::operator HGDIOBJ()
const
1053# if defined(UNICODE)
1054 return ::GetObjectW(
Handle, count,
object);
1056 return ::GetObjectA(
Handle, count,
object);
1088inline TPen::operator HPEN()
const
1093#if defined(OWL5_COMPAT)
1119inline TBrush::operator HBRUSH()
const
1124#if defined(OWL5_COMPAT)
1151inline TFont::operator HFONT()
const
1156#if defined(OWL5_COMPAT)
1231inline TPalette::operator HPALETTE()
const
1243 return ::UnrealizeObject(
Handle);
1252 return ::ResizePalette(
GetHandle(), numEntries);
1278 return ::SetPaletteEntries(
GetHandle(), start, count, (PALETTEENTRY *)entries);
1280 return ::SetPaletteEntries(
GetHandle(), start, count, entries);
1294 return ::SetPaletteEntries(
GetHandle(), index, 1, (PALETTEENTRY *)&entry);
1296 return ::SetPaletteEntries(
GetHandle(), index, 1, &entry);
1308 return ::GetPaletteEntries(
GetHandle(), start, count, entries);
1318 return ::GetPaletteEntries(
GetHandle(), index, 1, &entry);
1327 return ::GetNearestPaletteIndex(
GetHandle(), Color);
1364inline TBitmap::operator HBITMAP()
const
1374 return ::GetBitmapBits(
GetHandle(), count, bits);
1382 return ::SetBitmapBits(
GetHandle(), count, bits);
1392 return ::GetBitmapDimensionEx(
GetHandle(), &size);
1402 return ::SetBitmapDimensionEx(
GetHandle(), size.cx, size.cy, oldSize);
1435inline TRegion::operator HRGN()
const{
1468 return ::PtInRegion(
GetHandle(), point.x, point.y);
1507 ::CombineRgn(
GetHandle(), source,
nullptr, RGN_COPY);
1517 ::OffsetRgn(
GetHandle(), delta.cx, delta.cy);
1527 ::OffsetRgn(
GetHandle(), -delta.cx, -delta.cy);
1583inline TIcon::operator HICON()
const
1593 return Handle == other.Handle;
1596#if defined(OWL5_COMPAT)
1605 return ::GetIconInfo(
GetHandle(), IconInfo);
1615 return ::GetIconInfo((HICON)
GetHandle(), IconInfo);
1632inline TCursor::operator HCURSOR()
const
1680 return &Info->bmiHeader;
1689 return &Info->bmiHeader;
1713 return reinterpret_cast<const uint16*
>(Colors);
1721 return reinterpret_cast<uint16*
>(Colors);
1751inline TDib::operator HANDLE()
const
1761inline TDib::operator
const BITMAPINFO *()
const
1771inline TDib::operator BITMAPINFO *()
1779inline TDib::operator
const BITMAPINFOHEADER *()
const
1787inline TDib::operator BITMAPINFOHEADER *()
1815 return Info !=
nullptr;
1834 return static_cast<int>(Info->bmiHeader.biWidth);
1842 return std::abs(
static_cast<int>(Info->bmiHeader.biHeight));
1850 return static_cast<int>(Info->bmiHeader.biHeight) - 1 - y;
1867 return static_cast<int>((w*bpp+31)&(~31))/8;
1875 return Info->bmiHeader.biBitCount;
1892 return Info->bmiHeader.biCompression;
1900 return Info->bmiHeader.biSizeImage != 0 ? Info->bmiHeader.biSizeImage :
1901 (
ScanBytes(Info->bmiHeader.biWidth, Info->bmiHeader.biBitCount) * Info->bmiHeader.biHeight);
1938 return Mode == DIB_RGB_COLORS ?
1948 return static_cast<uint32>((
reinterpret_cast<char*
>(Bits) +
SizeImage()) -
reinterpret_cast<char*
>(Info));
#define PRECONDITION(condition)
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.
uint32 GetBitmapBits(uint32 count, void *bits) const
Copies up to count bits of this bitmap to the buffer bits.
uint32 SetBitmapBits(uint32 count, const void *bits)
Copies up to count bits from the bits buffer to this bitmap.
HBITMAP THandle
TBitmap encapsulates an HBITMAP.
HBITMAP GetHandle() const
Returns the handle of the bitmap of type BITMAP.
bool GetBitmapDimension(TSize &size) const
Retrieves the size of this bitmap (width and height, measured in tenths of millimeters) and sets it i...
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...
bool SetBitmapDimension(const TSize &size, TSize *oldSize=nullptr)
Sets the size of this bitmap from the given size argument (width and height, measured in tenths of mi...
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.
bool GetObject(BITMAP &bitmap) const
Retrieves data (width, height, and color format) for this bitmap and sets it in the given BITMAP stru...
TSize GetBitmapDimension() const
Functional-style overload.
TBitmap(HBITMAP handle, TAutoDelete autoDelete=NoAutoDelete)
Construct an alias TBitmap for an existing bitmap handle.
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 GDI Brush class is derived from TGdiObject.
LOGBRUSH GetObject() const
Retrieves information about this brush object and places it in the given LOGBRUSH structure.
HBRUSH GetHandle() const
Returns the handle of the brush with type HBRUSH.
TBrush(HBRUSH handle, TAutoDelete autoDelete=NoAutoDelete)
TBrush encapsulates an HBRUSH.
The clipboard class encapsulates the methods for the clipboard object of Windows.
Class wrapper for management of color values.
static const TColor White
Static TColor object with fixed Value set by RGB(255, 255, 255).
static const TColor Black
Static TColor object with fixed Value set by RGB(0, 0, 0).
auto GetInfo() const -> TInfo
Retrieves information about this cursor.
TCursor(HCURSOR handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TCursor object and sets the Handle data member to the given borrowed handle.
bool operator==(const TCursor &other) const
Returns true if this cursor equals other; otherwise returns false.
HCURSOR GetHandle() const
Returns the handle of the cursor with type HCURSOR.
auto GetIconInfoEx() const -> ICONINFOEX
Retrieves information about this cursor.
HCURSOR THandle
TCursor encapsulates an HCURSOR.
auto GetIconInfo() const -> ICONINFO
Retrieves information about this cursor.
TDC is the root class for GDI DC wrappers.
Encapsulates the system font used for a specific GUI element, e.g. icon, caption, menu,...
TSystemFontId
Defines the various GUI elements for which a default font can be created.
@ sfiMessage
Represents NONCLIENTMETRICS::lfMessageFont.
@ sfiCaption
Represents NONCLIENTMETRICS::lfCaptionFont.
@ sfiStatus
Represents NONCLIENTMETRICS::lfStatusFont.
@ sfiLegacyDefault
Represents the font returned by GetStockObject (DEFAULT_GUI_FONT).
@ sfiMenu
Represents NONCLIENTMETRICS::lfMenuFont.
@ sfiSmallCaption
Represents NONCLIENTMETRICS::lfSmCaptionFont.
@ sfiIcon
Represents ICONMETRICS::lfFont.
TDefaultGuiFont(TSystemFontId=sfiLegacyDefault)
Create a wrapper for the given system font.
Internal DIB file Reda/Write functions talk to these interfaces.
virtual void Skip(long size)=0
virtual long Read(void *buffer, long size)=0
virtual bool Write(void *buffer, long size)=0
Pseudo-GDI object Device Independent Bitmap (DIB) class.
uint NumScans() const
Returns the number of scans in this DIB.
TColor GetColor(int entry) const
Returns the color for the given palette entry.
int BitsPixel() const
Return the number of bits (2, 4, 8, 16, 24, or 32) used to store a pixel for the DIB.
uint16 Usage() const
Returns the Mode for this DIB.
uint32 SizeDib() const
Size of dib is measured as the end of the bits minus the start of the block.
const uint16 * GetIndices() const
Returns the bmiColors indexes of this DIB.
uint16 GetIndex(int entry) const
HANDLE THandle
TDib encapsulates an memory HANDLE w/ a DIB.
int FindIndex(uint16 index)
Returns the palette entry corresponding to the given index.
bool Write(TFile &file, bool writeFileHeader=false)
Write this DIB to a file object.
bool IsPM() const
Returns true if IsCore is true; that is, if the DIB is an old-style PM DIB using core headers.
int32 SizeColors() const
Return number of colors times the size of each entry in the table, whether it is an RGB color table o...
bool Read(TFile &file, bool readFileHeader=false)
Read a Windows 3.x or PM 1.x device independent bitmap from a TFile Return true iff Dib was read OK.
bool IsOK() const
Returns false if Info is 0, otherwise returns true.
void ResToMemHandle()
Under Win32, resources are read-only.
void CopyOnWrite()
Copies the DIB.
int FindColor(const TColor &color)
Returns the palette entry for the given color.
bool WriteFile(const tstring &filename)
Writes the DIB into an external file.
void SetColor(int entry, const TColor &color)
Sets the given color for the given palette entry.
bool LoadResource(HINSTANCE, TResId)
Loads this DIB from the given resource and returns true if successful.
const BITMAPINFOHEADER * GetInfoHeader() const
Returns this DIB's bmiHeader field of the BITMAPINFO structure contains information about the color a...
void * PixelPtr(uint16 x, uint16 y)
Returns the byte of where the pixel is located.
int MapColor(const TColor &fromColor, const TColor &toColor, bool doAll=false)
Maps the first or all occurances of fromColor to the toColor in the current palette of this DIB.
int MapIndex(uint16 fromIndex, uint16 toIndex, bool doAll=false)
Maps the fromIndex to the toIndex in the current palette of this DIB.
bool ReadFile(const tstring &name)
Tests if the passed file is a Windows 3.x (or PM 1.x) DIB and if so read it.
int Pitch() const
Size of scan in bytes = Pixel Width * bits per pixel rounded up to a uint32 boundary.
int XOffset(uint16 x) const
Returns the byte offset from the start of the scan line to the xth pixel.
void ToClipboard(TClipboard &clipboard)
Moves this dib to the clipboard.
const BITMAPINFO * GetInfo() const
Returns this DIB's Info field.
int Width() const
Returns the width of the DIB.
static int ScanBytes(long w, int bpp)
Width+bpp to dword aligned bytes.
TDib(HGLOBAL handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TDib object and sets the Handle data member to the given borrowed handle.
bool ChangeModeToRGB(const TPalette &pal)
Converts the existing color table in place to use absolute RGB values.
int Height() const
Returns the height of the DIB.
TSize Size() const
Returns TSize(W,H), the size of this DIB.
void InfoFromHeader(const BITMAPINFOHEADER &infoHeader)
Given a BITMAPINFOHEADER, allocate a global buffer for Handle & init Info.
void SetIndex(int entry, uint16 index)
Sets the given index for the given entry.
bool operator==(const TDib &other) const
Compares two handles and returns true if this DIB's handle equals the other (other) DIB's handle.
int YOffset(uint16 y) const
Returns the starting position of the scan line.
uint StartScan() const
Returns the starting scan line.
HANDLE Handle
GDI handle of this object.
long NumColors() const
Returns NumClrs, the number of colors in this DIB's palette.
void InfoFromHandle()
Locks the global/res handle if needed and extracts the pointers and cached info maintained as member ...
int FlippedY(int y) const
Returns the coordinate of y if the direction of the y-axis was reversed.
uint32 SizeImage() const
Returns number of bytes used to store the image.
bool ChangeModeToPal(const TPalette &pal)
Converts the existing color table in place to use palette relative values.
uint32 Compression() const
Returns type of compression and encoding for bottom-up DIBs.
const void * GetBits() const
Returns the Bits data member for this DIB.
const TRgbQuad * GetColors() const
Returns the bmiColors value of this DIB.
HANDLE GetHandle() const
Returns the handle of the DIB with type HANDLE.
The TFile class encapsulates standard file characteristics and operations.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
HFONT GetHandle() const
Returns the handle of the font with type HFONT.
int GetHeight() const
Returns the height of the font.
LOGFONT GetObject() const
Returns information about this font object.
TEXTMETRIC GetTextMetrics(TDC &dc) const
Retrieves information about this font when selected in the specified dc.
int GetMaxWidth() const
Returns the maximum width of the characters in the font.
TFont(HFONT handle, TAutoDelete autoDelete=NoAutoDelete)
TFont encapsulates an HFONT.
int GetAveWidth() const
Returns the average width of the characters in the font.
TGdiBase()
This default constructor sets Handle to 0 and ShouldDelete to true.
void CheckValid(uint resId=IDS_GDIFAILURE)
static void _CheckValid(HANDLE handle, uint resId=IDS_GDIFAILURE)
bool ShouldDelete
Should object delete GDI handle in dtor?
HANDLE Handle
GDI handle of this object.
GdiObject is the root, pseudo-abstract base class for ObjectWindows' GDI (Graphics Device Interface) ...
bool IsGDIObject() const
Returns true if this represents a real GDI object.
HGDIOBJ GetGdiHandle() const
Returns the handle of the GDI object.
TType
This enumeration is used to store the object type in the struct TObjInfo.
uint32 GetObjectType() const
Returns the type of the GDI object.
int GetObject(int count, void *object) const
Retrieve the object's attributes into a buffer.
bool ShouldDelete
Should object delete GDI handle in dtor?
TGdiObject()
This default constructor sets Handle to 0 and ShouldDelete to true.
bool operator==(const TGdiObject &other) const
Returns true if the handles are equal. This is a binary compare.
HANDLE Handle
GDI handle of this object.
auto IsHandleOwner() const -> bool
Returns true if handle lifetime is managed.
HGDIOBJ THandle
TGdiObject encapsulates an HGDIOBJ.
static const uint8 Hatch11F1[8]
The static array Hatch11F1[8] holds the logical hatched brush pattern of one pixel on and one pixel o...
static const uint8 Hatch13F1[8]
The static array Hatch13F1[8] holds a hatched brush pattern of one pixel on and three pixels off in f...
void Reconstruct(const uint8 hatch[], const TColor &fgColor, const TColor &bgColor)
Reconstructs the hatched brush with a new pattern or new set of colors.
static const uint8 Hatch22F1[8]
The static array Hatch22F1[8] holds a monochrome hatched brush pattern of two pixels on and two off i...
static const uint8 Hatch13B1[8]
The static array Hatch13B1[8] holds a hatched brush pattern of one pixel on and three pixels off in b...
THatch8x8Brush(const uint8 hatch[], const TColor &fgColor=TColor::White, const TColor &bgColor=TColor::Black)
Constructs a THatchBrush object with the specified hatched pattern and colors.
static const uint8 Hatch22B1[8]
The static array Hatch22B1[8] holds a hatched brush pattern of two pixels on and two off in backward ...
auto GetIconInfo() const -> ICONINFO
Retrieves information about this icon.
TIcon(HICON handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TIcon object and sets the Handle data member to the given borrowed handle.
auto GetIconInfoEx() const -> ICONINFOEX
Retrieves information about this icon.
auto GetInfo() const -> TInfo
Retrieves information about this icon.
bool operator==(const TIcon &other) const
Returns true if the handles of two icons are identical.
HICON GetHandle() const
Returns the handle of the icon with type HICON.
HICON THandle
TIcon encapsulates an HICON.
TPalette is the GDI Palette class derived from TGdiObject.
TPalette(HPALETTE handle, TAutoDelete autoDelete=NoAutoDelete)
Alias an existing palette handle. Assume ownership if autoDelete says so.
void AnimatePalette(uint start, uint count, const PALETTEENTRY *entries)
Animate palette from entry 'start' for 'count' entries.
HPALETTE THandle
TPalette encapsulates an HPALETTE.
uint SetPaletteEntry(uint16 index, const PALETTEENTRY &entry)
Sets the RGB color value at index in this palette from the entry argument.
uint GetPaletteEntries(uint16 start, uint16 count, PALETTEENTRY *entries) const
Retrieves a range of entries in this logical palette and places them in the entries array.
uint GetNearestPaletteIndex(const TColor &color) const
Returns the index of the color entry that represents the closest color in this palette to the given c...
uint SetPaletteEntries(uint16 start, uint16 count, const PALETTEENTRY *entries)
Sets the RGB color values in this palette from the entries array of PALETTEENTRY structures.
uint GetPaletteEntry(uint16 index, PALETTEENTRY &entry) const
Retrieves the entry in this logical palette at index and places it in the entries array.
bool GetObject(uint16 &numEntries) const
Finds the number of entries in this logical palette and sets the value in the numEntries argument.
HPALETTE GetHandle() const
Returns the handle of the palette.
void ToClipboard(TClipboard &Clipboard)
Moves this palette to the target Clipboard argument.
uint16 GetNumEntries() const
Returns the number of entries in this palette, or 0 if the call fails.
bool UnrealizeObject()
Directs the GDI to completely remap the logical palette to the system palette on the next RealizePale...
TPalette(const PALETTEENTRY(&entries)[N])
Creates a TPalette object with the entries from the given array.
bool ResizePalette(uint numEntries)
Changes the size of this logical palette to the number given by numEntries.
TPen(HPEN handle, TAutoDelete autoDelete=NoAutoDelete)
Alias an existing pen handle. Assume ownership if autoDelete says so.
LOGPEN GetObject() const
Retrieves information about this pen object and places it in the given LOGPEN structure.
HPEN GetHandle() const
Returns the handle of the pen with type HPEN.
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
TRegion, derived from TGdiObject, represents GDI abstract shapes or regions.
bool Contains(const TPoint &point) const
Returns true if this region contains the given point.
TRegion(const TPoint *points, const int(&polyCounts)[N], int fillMode)
Creates a filled TRegion object from the poly-polygons given by points and fillMode.
TRegion & operator|=(const TRegion &source)
Creates the union of this region and the given source region , and returns a reference to the result.
bool Touches(const TRect &rect) const
Returns true if this region touches the given rectangle.
auto Release() -> HRGN
Returns the encapsulated handle of the region and relinquishes ownership.
TRegion & operator+=(const TSize &delta)
Adds the given delta to each point of this region to displace (translate) it by delta....
TEllipse
Defines the class-specific constant Ellipse, used to distinguish the ellipse constructor from the rec...
TRegion & operator&=(const TRegion &source)
Creates the intersection of this region with the given source region and returns a reference to the r...
TRegion & operator^=(const TRegion &source)
Creates the exclusive-or of this region and the given source region.
TRegion & operator=(const TRegion &source)
Assigns the source region to this region.
TRegion()
The default constructor creates an empty TRegion object.
TRegion(const TPoint(&points)[N], int fillMode)
Creates a filled TRegion object from the polygon given by an array of points and fillMode.
TRect GetRgnBox() const
Returns the bounding rectangle of the region.
void SetRectRgn(const TRect &rect)
Creates a rectangle of the size given by rect.
bool operator==(const TRegion &other) const
Returns true if the regions are identical (equal in size and shape).
HRGN GetHandle() const
Returns the handle of the region with type HREGION.
bool operator!=(const TRegion &other) const
Returns true if this region is not equal to the other region.
HRGN THandle
TRegion encapsulates an HRGN.
TRegion & operator-=(const TSize &delta)
Subtracts the given delta from each point of this region to displace (translate) it by -delta....
Wrapper for Windows' RBGQUAD type.
The TRiffFile class is used for reading and writing RIFF files.
The tagSIZE struct is defined as.
TSize()
Default constructor that does nothing.
Describes an exception resulting from GDI failures such as creating too many TWindow device contexts ...
Definition of classes for clipboard Encapsulation.
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
Definition of base most abstract GDI object class, and associated exception class.
Classes for window system geometry.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
TDefaultGuiFont TDefaultGUIFont
Deprecated alias.
Object Windows Library (OWLNext Core).
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.