15#if defined(BI_HAS_PRAGMA_ONCE)
130 operator HDC()
const;
140 bool GetDCOrg(
TPoint& point)
const;
141 virtual int SaveDC()
const;
142 virtual bool RestoreDC(
int savedDC = -1);
143 virtual int GetDeviceCaps(
int index)
const;
144 virtual bool ResetDC(
const DEVMODE& devMode);
148 void SelectObject(
const TBrush& brush);
149 void SelectObject(
const TPen& pen);
150 virtual void SelectObject(
const TFont& font);
151 void SelectObject(
const TPalette& palette,
bool forceBackground=
false);
152 void SelectObject(
const TBitmap& bitmap);
153 virtual void SelectStockObject(
int index);
156 virtual void RestoreFont();
157 void RestorePalette();
158 void RestoreBitmap();
159 void RestoreTextBrush();
160 void RestoreObjects();
161 HANDLE GetCurrentObject(
uint objectType)
const;
165 bool GetBrushOrg(
TPoint& point)
const;
166 bool SetBrushOrg(
const TPoint& origin,
TPoint * oldOrg=
nullptr);
167 int EnumObjects(
uint objectType, GOBJENUMPROC proc,
void * data)
const;
172 int RealizePalette();
174 uint GetSystemPaletteEntries(
int start,
int num,
175 PALETTEENTRY * entries)
const;
176 uint GetSystemPaletteUse()
const;
177 int SetSystemPaletteUse(
int usage);
181 TColor GetBkColor()
const;
183 int GetBkMode()
const;
184 int SetBkMode(
int mode);
185 int GetPolyFillMode()
const;
186 int SetPolyFillMode(
int mode);
188 int SetROP2(
int mode);
189 int GetStretchBltMode()
const;
190 int SetStretchBltMode(
int mode);
191 TColor GetTextColor()
const;
194 bool SetMiterLimit(
float newLimit,
float* oldLimit=
nullptr);
198 int GetMapMode()
const;
199 virtual int SetMapMode(
int mode);
201 bool SetWorldTransform(XFORM & xform);
202 bool ModifyWorldTransform(XFORM & xform,
uint32 mode);
204 bool GetViewportOrg(
TPoint& point)
const;
205 TPoint GetViewportOrg()
const;
207 virtual bool OffsetViewportOrg(
const TPoint& delta,
TPoint * oldOrg=
nullptr);
209 bool GetViewportExt(
TSize& extent)
const;
210 TSize GetViewportExt()
const;
212 virtual bool ScaleViewportExt(
int xNum,
int xDenom,
int yNum,
int yDenom,
213 TSize * oldExtent=
nullptr);
215 bool GetWindowOrg(
TPoint& point)
const;
216 TPoint GetWindowOrg()
const;
218 bool OffsetWindowOrg(
const TPoint& delta,
TPoint * oldOrg=
nullptr);
220 bool GetWindowExt(
TSize& extent)
const;
221 TSize GetWindowExt()
const;
223 virtual bool ScaleWindowExt(
int xNum,
int xDenom,
int yNum,
int yDenom,
224 TSize * oldExtent=
nullptr);
228 bool DPtoLP(
TPoint* points,
int count = 1)
const;
229 bool DPtoLP(
TRect& rect)
const;
230 bool LPtoDP(
TPoint* points,
int count = 1)
const;
231 bool LPtoDP(
TRect& rect)
const;
235 int GetClipBox(
TRect& rect)
const;
236 TRect GetClipBox()
const;
237 int ExcludeClipRect(
const TRect& rect);
238 int ExcludeUpdateRgn(HWND wnd);
239 int IntersectClipRect(
const TRect& rect);
240 int OffsetClipRgn(
const TPoint& delta);
241 int SelectClipRgn(
const TRegion& region);
255 bool PtVisible(
const TPoint& point)
const;
256 bool RectVisible(
const TRect& rect)
const;
257 bool GetBoundsRect(
TRect& bounds,
uint16 flags)
const;
259 int GetClipRgn(
TRegion& region)
const;
264 MFENUMPROC callback,
void * data)
const;
266 void PlayMetaFileRecord(HANDLETABLE & handletable,
267 METARECORD & metaRecord,
int count);
269 ENHMFENUMPROC callback,
void* data,
270 const TRect* rect)
const;
272 void PlayEnhMetaFileRecord(HANDLETABLE& handletable,
273 ENHMETARECORD& metaRecord,
uint count);
277 bool GetCurrentPosition(
TPoint& point)
const;
278 bool MoveTo(
int x,
int y);
279 bool MoveTo(
const TPoint& point);
284 bool DrawIcon(
int x,
int y,
const TIcon& icon);
285 bool DrawIcon(
const TPoint& point,
const TIcon& icon);
286 bool DrawCursor(
int x,
int y,
const TCursor& cursor);
288 bool DrawIcon(
int x,
int y,
const TIcon& icon,
int w,
int h,
289 int aniStep=0, HBRUSH bkBr=0,
uint flags=DI_NORMAL);
290 bool DrawIcon(
const TPoint& point,
const TIcon& icon,
291 const TSize& size,
int aniStep=0, HBRUSH bkBr=0,
292 uint flags=DI_NORMAL);
293 bool DrawCursor(
int x,
int y,
const TCursor& cursor,
int w,
int h,
294 int aniStep=0, HBRUSH bkBr=0,
uint flags=DI_NORMAL);
296 const TSize& size,
int aniStep=0, HBRUSH bkBr=0,
297 uint flags=DI_NORMAL);
301 bool FrameRect(
int x1,
int y1,
int x2,
int y2,
const TBrush& brush);
302 bool FrameRect(
const TRect& rect,
const TBrush& brush);
303 bool FillRect(
int x1,
int y1,
int x2,
int y2,
const TBrush& brush);
304 bool FillRect(
const TRect& rect,
const TBrush& brush);
305 bool InvertRect(
int x1,
int y1,
int x2,
int y2);
306 bool InvertRect(
const TRect& rect);
307 bool DrawFocusRect(
int x1,
int y1,
int x2,
int y2);
308 bool DrawFocusRect(
const TRect& rect);
314 bool TextRect(
int x1,
int y1,
int x2,
int y2);
315 bool TextRect(
const TRect& rect);
316 bool TextRect(
int x1,
int y1,
int x2,
int y2,
const TColor& color);
317 bool TextRect(
const TRect& rect,
const TColor& color);
322 void OWLFastWindowFrame(
TBrush &brush,
TRect &r,
int xWidth,
int yWidth,
uint32 rop = PATCOPY);
328 bool InvertRgn(
const TRegion& region);
329 bool PaintRgn(
const TRegion& region);
333 bool AngleArc(
int x,
int y,
uint32 radius,
float startAngle,
335 bool AngleArc(
const TPoint& center,
uint32 radius,
float startAngle,
337 bool Arc(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
340 bool Chord(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
343 bool Pie(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
346 bool Ellipse(
int x1,
int y1,
int x2,
int y2);
348 bool Ellipse(
const TPoint& point,
const TSize& size);
349 bool Ellipse(
const TRect& rect);
350 bool LineTo(
int x,
int y);
351 bool LineTo(
const TPoint& point);
352 bool Polyline(
const TPoint* points,
int count);
353 bool Polygon(
const TPoint* points,
int count);
354 bool PolyPolygon(
const TPoint* points,
const int* PolyCounts,
356 bool PolyPolyline(
const TPoint* points,
const int* PolyCounts,
358 bool PolyBezier(
const TPoint* points,
int count);
359 bool PolyBezierTo(
const TPoint* points,
int count);
360 bool PolyDraw(
const TPoint* points,
uint8* types,
int count);
361 bool PolylineTo(
const TPoint* points,
int count);
362 bool Rectangle(
int x1,
int y1,
int x2,
int y2);
364 bool Rectangle(
const TPoint& point,
const TSize& s);
365 bool Rectangle(
const TRect& rect);
366 bool RoundRect(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
369 bool RoundRect(
const TRect& rect,
const TPoint& rad);
373 TColor GetPixel(
int x,
int y)
const;
377 bool BitBlt(
int dstX,
int dstY,
int w,
int h,
const TDC& srcDC,
378 int srcX,
int srcY,
uint32 rop=SRCCOPY);
379 bool BitBlt(
const TRect& dst,
const TDC& srcDC,
381 bool PatBlt(
int x,
int y,
int w,
int h,
uint32 rop=PATCOPY);
383 bool ScrollDC(
int x,
int y,
const TRect& scroll,
const TRect& clip,
385 bool ScrollDC(
const TPoint& delta,
const TRect& scroll,
388 bool StretchBlt(
int dstX,
int dstY,
int dstW,
int dstH,
389 const TDC& srcDC,
int srcX,
int srcY,
int srcW,
390 int srcH,
uint32 rop=SRCCOPY);
391 bool StretchBlt(
const TRect& dst,
const TDC& srcDC,
393 bool MaskBlt(
const TRect& dst,
const TDC& srcDC,
396 bool PlgBlt(
const TPoint* points,
const TDC& srcDC,
399#if defined(OWL5_COMPAT)
400 bool PlgBlt(
const TPoint& dst,
const TDC& srcDC,
404 bool TransparentBlt(
const TRect& dst,
const TDC& srcDC,
const TRect& src,
const TColor& transparent);
406 void * bits,
const BITMAPINFO & info,
410 const void * bits,
const BITMAPINFO & Info,
413 int SetDIBitsToDevice(
const TRect& dst,
const TPoint& src,
416 const BITMAPINFO & bitsInfo,
uint16 usage);
417 int SetDIBitsToDevice(
const TRect& dst,
const TPoint& src,
419 int StretchDIBits(
const TRect& dst,
const TRect& src,
421 const BITMAPINFO & bitsInfo,
423 int StretchDIBits(
const TRect& dst,
const TRect& src,
426 HBITMAP CreateDIBSection(
const BITMAPINFO& info,
uint usage,
void** bits, HANDLE section=0,
uint32 offset=0);
428 bool FloodFill(
const TPoint& point,
const TColor& color);
433 virtual bool TextOut(
int x,
int y,
434 const tstring& str,
int count = -1);
436 bool TextOut(
const TPoint& p,
437 const tstring& str,
int count = -1);
439 virtual bool ExtTextOut(
int x,
int y,
uint16 options,
const TRect* r,
440 const tstring& str,
int count = -1,
const int * dx =
nullptr);
443 const tstring& str,
int count = -1,
const int * dx =
nullptr);
445 virtual bool TabbedTextOut(
const TPoint& p,
447 int numPositions,
const int* positions,
int tabOrigin,
TSize& size);
449 bool TabbedTextOut(
const TPoint& p,
451 int numPositions,
const int* positions,
int tabOrigin);
457 virtual int DrawTextEx(LPTSTR str,
int count,
TRect* =
nullptr,
458 uint format=0, LPDRAWTEXTPARAMS =
nullptr);
460 bool DrawFrameControl(
TRect lpRect, UINT nType, UINT nState);
462 virtual bool GrayString(
const TBrush& brush, GRAYSTRINGPROC outputFunc,
465 bool GetTextExtent(
const tstring& str,
int stringLen,
TSize& size)
const;
467 TSize GetTextExtent(
const tstring& str,
int stringLen)
const;
469 bool GetTabbedTextExtent(
const tstring& str,
int stringLen,
470 int numPositions,
const int * positions,
TSize& size)
const;
472 TSize GetTabbedTextExtent(
const tstring& str,
int stringLen,
473 int numPositions,
const int * positions)
const;
475 uint GetTextAlign()
const;
479 int GetTextCharacterExtra()
const;
481 int SetTextCharacterExtra(
int extra);
483 bool SetTextJustification(
int breakExtra,
int breakCount);
485 int GetTextFaceLength()
const;
487 int GetTextFace(
int count, LPTSTR facename)
const;
491 bool GetTextMetrics(TEXTMETRIC & metrics)
const;
492 TEXTMETRIC GetTextMetrics()
const;
495 uint32 buffSize,
void* buffer,
const MAT2 & mat2);
497 int GetKerningPairs(
int pairs, KERNINGPAIR * krnPair);
499 uint GetOutlineTextMetrics(
uint data, OUTLINETEXTMETRIC & otm);
503 bool GetCharWidth(
uint firstChar,
uint lastChar,
int* buffer);
505 bool GetAspectRatioFilter(
TSize& size)
const;
506 int EnumFonts(LPCTSTR faceName, OLDFONTENUMPROC callback,
510 {
return EnumFonts(facename.c_str(), callback, data);}
512 int EnumFontFamilies(LPCTSTR family,
513 FONTENUMPROC proc,
void * data)
const;
519 bool GetCharABCWidths(
uint firstChar,
uint lastChar, ABC* abc);
530 bool StrokeAndFillPath();
531 bool SelectClipPath(
int mode);
536 virtual HDC GetAttributeHDC()
const;
578 TDC& operator =(
const TDC&);
699 LPCTSTR description =
nullptr);
727 TCreatedDC(LPCTSTR driver, LPCTSTR device,
const DEVMODE* initData =
nullptr);
730#if defined(OWL5_COMPAT)
732 TCreatedDC(LPCTSTR driver, LPCTSTR device, LPCTSTR output,
const DEVMODE* initData =
nullptr);
757 TIC(LPCTSTR driver, LPCTSTR device,
const DEVMODE* initData =
nullptr);
760#if defined(OWL5_COMPAT)
762 TIC(LPCTSTR driver, LPCTSTR device, LPCTSTR output,
const DEVMODE* initData =
nullptr);
771 TIC& operator =(
const TIC&);
794 TMemoryDC(LPCTSTR driver, LPCTSTR device,
const DEVMODE* initData =
nullptr);
797#if defined(OWL5_COMPAT)
799 TMemoryDC(LPCTSTR driver, LPCTSTR device, LPCTSTR output,
const DEVMODE* initData =
nullptr);
829 int srcX=0,
int srcY=0)
const;
832 int srcX,
int srcY,
int srcW,
int srcH)
const;
879#if defined(OWL5_COMPAT)
881 TPrintDC(LPCTSTR driver, LPCTSTR device, LPCTSTR output,
const DEVMODE* initData =
nullptr);
886 int Escape(
int escape,
int count=0,
const void* inData=
nullptr,
887 void* outData=
nullptr);
890 int StartDoc(LPCTSTR docName, LPCTSTR output =
nullptr);
893 {
return StartDoc(docName.c_str(), output.empty() ?
nullptr : output.c_str());}
896 int BandInfo(TBandInfo& bandInfo);
897 int NextBand(TRect& rect);
902 uint QueryEscSupport(
int escapeNum);
903 int SetCopyCount(
int reqestCount,
int& actualCount);
905#if defined(OWL5_COMPAT)
907 static uint32 DeviceCapabilities(LPCTSTR driver,
910 int capability, LPTSTR output=0,
911 LPDEVMODE devmode=0);
913 static uint32 DeviceCapabilities(
914 const tstring& driver,
915 const tstring& device,
919 LPDEVMODE devmode = 0);
924 DOCINFO& GetDocInfo();
925 void SetDocInfo(
const DOCINFO& docinfo);
942 TPrintDC(
const TPrintDC&);
943 TPrintDC& operator =(
const TPrintDC&);
960#if !defined(OWL_METAFILE_H)
973inline TDC::operator HDC()
const
992 return ::GetObjectType(
GetHDC()) != 0;
1012 return ::GetBrushOrgEx(
GetHDC(), &point);
1022 return ::SetBrushOrgEx(
GetHDC(), org.x, org.y, oldOrg);
1037 return ::EnumObjects(
GetHDC(), objectType, proc,
reinterpret_cast<LPARAM
>(data));
1056 return ::RealizePalette(
GetHDC());
1075 return ::GetSystemPaletteEntries(
GetHDC(), start, num, entries);
1084 return ::GetSystemPaletteUse(
GetHDC());
1093 return ::SetSystemPaletteUse(
GetHDC(), usage);
1414 return ::DPtoLP(
GetAttributeHDC(),
reinterpret_cast<LPPOINT
>(&rect), 2);
1436 return ::LPtoDP(
GetAttributeHDC(),
reinterpret_cast<LPPOINT
>(&rect), 2);
1450 return ::GetClipBox(
GetHDC(), &rect);
1480 return ::ExcludeClipRect(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom);
1494 return ::ExcludeUpdateRgn(
GetHDC(), Wnd);
1508 return ::IntersectClipRect(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom);
1521 return ::OffsetClipRgn(
GetHDC(), delta.x, delta.y);
1535 return ::SelectClipRgn(
GetHDC(), region);
1544 return ::PtVisible(
GetHDC(), point.x, point.y);
1553 return ::RectVisible(
GetHDC(), &rect);
1574 return ::GetBoundsRect(
GetHDC(), &bounds, flags);
1597 return ::SetBoundsRect(
GetHDC(), &bounds, flags);
1610 return ::GetClipRgn(
GetHDC(), (HRGN)region);
1626 return ::EnumMetaFile(
GetHDC(), metafile, callback,
reinterpret_cast<LPARAM
>(data));
1645 METARECORD & metaRecord,
int count)
1654 void * data,
const TRect* rect)
const
1656 return ::EnumEnhMetaFile(
GetHDC(), metafile, callback, data, rect);
1664 return ::PlayEnhMetaFile(
GetHDC(), metafile, rect);
1671 ENHMETARECORD & metaRecord,
uint count)
1682 return ::GetCurrentPositionEx(
GetHDC(), &point);
1692 return ::MoveToEx(
GetHDC(), x, y,
nullptr);
1702 return ::MoveToEx(
GetHDC(), point.x, point.y,
nullptr);
1712 return ::MoveToEx(
GetHDC(), point.x, point.y, &OldPoint);
1722 return ::DrawIcon(
GetHDC(), x, y, icon);
1733 return ::DrawIcon(
GetHDC(), point.x, point.y, icon);
1739 return ::DrawIcon(
GetHDC(), x, y, HICON(HCURSOR(cursor)));
1745 return ::DrawIcon(
GetHDC(), point.x, point.y, HICON(HCURSOR(cursor)));
1750 int aniStep, HBRUSH bkBr,
uint flags)
1752 return ::DrawIconEx(
GetHDC(), x, y, icon, w, h, aniStep, bkBr, flags);
1756 const TSize& size,
int aniStep, HBRUSH bkBr,
uint flags)
1758 return ::DrawIconEx(
GetHDC(), point.x, point.y, icon, size.cx, size.cy,
1759 aniStep, bkBr, flags);
1763 int aniStep, HBRUSH bkBr,
uint flags)
1765 return ::DrawIconEx(
GetHDC(), x, y, HICON(HCURSOR(cursor)), w, h, aniStep,
1770 const TSize& size,
int aniStep, HBRUSH bkBr,
uint flags)
1772 return ::DrawIconEx(
GetHDC(), point.x, point.y, HICON(HCURSOR(cursor)),
1773 size.cx, size.cy, aniStep, bkBr, flags);
1783 TRect r(x1, y1, x2, y2);
1784 return ::FrameRect(
GetHDC(), &r, brush);
1794 return ::FrameRect(
GetHDC(), &rect, brush);
1804 TRect r(x1, y1, x2, y2);
1805 return ::FillRect(
GetHDC(), &r, brush);
1815 return ::FillRect(
GetHDC(), &rect, brush);
1829 TRect r(x1, y1, x2, y2);
1856 TRect r(x1, y1, x2, y2);
1880 TRect r(x1, y1, x2, y2);
1881 return ::ExtTextOut(
GetHDC(), 0, 0, ETO_OPAQUE, &r,
nullptr, 0,
nullptr);
1890 return ::ExtTextOut(
GetHDC(), 0, 0, ETO_OPAQUE, &rect,
nullptr, 0,
nullptr);
1901 TRect r(x1, y1, x2, y2);
1902 return ::ExtTextOut(
GetHDC(), 0, 0, ETO_OPAQUE, &r,
nullptr, 0,
nullptr);
1915 return ::ExtTextOut(
GetHDC(), 0, 0, ETO_OPAQUE, &rect,
nullptr, 0,
nullptr);
1925 return ::FrameRgn(
GetHDC(), region, brush, brushSize.cx, brushSize.cy);
1934 return ::FillRgn(
GetHDC(), region, brush);
1946 return ::InvertRgn(
GetHDC(), region);
1971 return ::PaintRgn(
GetHDC(), region);
1988 return ::AngleArc(
GetHDC(), x, y, radius, startAngle, sweepAngle);
2005 return ::AngleArc(
GetHDC(), Center.x, Center.y, radius, StartAngle, SweepAngle);
2018inline bool TDC::Arc(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
2020 return ::Arc(
GetHDC(), x1, y1, x2, y2, x3, y3, x4, y4);
2035 return ::Arc(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom, start.x, start.y, end.x, end.y);
2047inline bool TDC::Chord(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
2049 return ::Chord(
GetHDC(), x1, y1, x2, y2, x3, y3, x4, y4);
2063 return ::Chord(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom, start.x, start.y, end.x, end.y);
2075inline bool TDC::Pie(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
2077 return ::Pie(
GetHDC(), x1, y1, x2, y2, x3, y3, x4, y4);
2091 return ::Pie(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom, start.x, start.y, end.x, end.y);
2103 return ::Ellipse(
GetHDC(), x1, y1, x2, y2);
2115 return ::Ellipse(
GetHDC(), p1.x, p1.y, p2.x, p2.y);
2127 return ::Ellipse(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy);
2139 return ::Ellipse(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom);
2150 return ::LineTo(
GetHDC(), x, y);
2161 return ::LineTo(
GetHDC(), point.x, point.y);
2172 return ::Polyline(
GetHDC(), points, count);
2178 return ::Polygon(
GetHDC(),
const_cast<TPoint*
>(points), count);
2192 return ::PolyPolygon(
GetHDC(),
const_cast<TPoint*
>(points), polyCounts, count);
2206 return ::PolyPolyline(
GetHDC(),
const_cast<TPoint*
>(points),
reinterpret_cast<const DWORD*
>(polyCounts), count);
2223 return ::PolyBezier(
GetHDC(),
const_cast<TPoint*
>(points), count);
2240 return ::PolyBezierTo(
GetHDC(),
const_cast<TPoint*
>(points), count);
2276 return ::PolyDraw(
GetHDC(),
const_cast<TPoint*
>(points), types, count);
2290 return ::PolylineTo(
GetHDC(),
const_cast<TPoint*
>(points), count);
2300 return ::Rectangle(
GetHDC(), x1, y1, x2, y2);
2310 return ::Rectangle(
GetHDC(), p1.x, p1.y, p2.x, p2.y);
2320 return ::Rectangle(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy);
2330 return ::Rectangle(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom);
2340 return ::RoundRect(
GetHDC(), x1, y1, x2, y2, x3, y3);
2350 return ::RoundRect(
GetHDC(), p1.x, p1.y, p2.x, p2.y, rad.x, rad.y);
2360 return ::RoundRect(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy, rad.x, rad.y);
2370 return ::RoundRect(
GetHDC(), rect.left, rect.top, rect.right, rect.bottom,
2379 return ::GetPixel(
GetHDC(), x, y);
2387 return ::GetPixel(
GetHDC(), point.x, point.y);
2396 return ::SetPixel(
GetHDC(), x, y, color);
2405 return ::SetPixel(
GetHDC(), point.x, point.y, color);
2422 int srcX,
int srcY,
uint32 rop)
2424 return ::BitBlt(
GetHDC(), dstX, dstY, w, h, srcDC, srcX, srcY, rop);
2444 srcDC, src.x, src.y, rop);
2450 return ::PatBlt(
GetHDC(), x, y, w, h, rop);
2472 return ::ScrollDC(
GetHDC(), dx, dy, &scroll, &clip, updateRgn, &updateRect);
2488 return ::ScrollDC(
GetHDC(), delta.x, delta.y, &scroll, &clip, updateRgn, &updateRect);
2503 const TDC& srcDC,
int srcX,
int srcY,
int srcW,
2506 return ::StretchBlt(
GetHDC(), dstX, dstY, dstW, dstH,
2507 srcDC, srcX, srcY, srcW, srcH, rop);
2524 return ::StretchBlt(
GetHDC(),
2526 srcDC, src.left, src.top,
2582 srcDC, src.x, src.y, maskBm, maskPos.x, maskPos.y,
2616 const TDC& srcDC,
const TRect& src,
2620 srcDC, src.left, src.top, src.
Width(), src.
Height(),
2621 maskBm, maskPos.x, maskPos.y);
2623#if defined(OWL5_COMPAT)
2625 const TDC& srcDC,
const TRect& src,
2629 srcDC, src.left, src.top, src.
Width(), src.
Height(),
2630 maskBm, maskPos.x, maskPos.y);
2643 return ::TransparentBlt(
GetHDC(),
2669 void * bits,
const BITMAPINFO & info,
2672 return ::GetDIBits(
GetHDC(), bitmap, startScan, numScans, bits,
2673 const_cast<BITMAPINFO*
>(&info), usage);
2713 const void * bits,
const BITMAPINFO & info,
2716 return ::SetDIBits(
GetHDC(), bitmap, startScan, numScans,
2717 bits,
const_cast<BITMAPINFO*
>(&info), usage);
2754 const BITMAPINFO & info,
uint16 usage)
2756 return ::SetDIBitsToDevice(
2757 GetHDC(), dst.left, dst.top,
2759 startScan, numScans,
2760 const_cast<void*
>(bits),
const_cast<BITMAPINFO*
>(&info), usage
2779 return ::SetDIBitsToDevice(
2784 const_cast<void*
>(dib.
GetBits()),
2803 const BITMAPINFO & info,
2806 return ::StretchDIBits(
2809 bits,
const_cast<BITMAPINFO*
>(&info), usage, rop
2829 return ::StretchDIBits(
2834 const_cast<BITMAPINFO*
>(dib.
GetInfo()),
2846 return ::CreateDIBSection(
GetHDC(),
const_cast<BITMAPINFO*
>(&info), usage, bits, section, offset);
2848 return ::CreateDIBSection(
GetHDC(), &info, usage, bits, section, offset);
2861 return ::FloodFill(
GetHDC(), point.x, point.y, color);
2882 return ::ExtFloodFill(
GetHDC(), point.x, point.y, color, fillType);
2899 return TextOut(p.x, p.y, str, count);
2924 const tstring& str,
int count,
const int * dx)
2926 return ExtTextOut(p.x, p.y, options, rect, str, count, dx);
2951 int numPositions,
const int* positions,
int tabOrigin)
2954 TabbedTextOut(p, str, count, numPositions, positions, tabOrigin, size);
2970 return ::GetTextExtentPoint32(
GetAttributeHDC(), str.c_str(), stringLen, &size);
3008 int numPositions,
const int* positions,
TSize& size)
const
3011 const_cast<int*
>(positions)));
3033 int numPositions,
const int* positions)
const
3036 const_cast<int*
>(positions)));
3149 return ::SetTextJustification(
GetAttributeHDC(), breakExtra, breakCount);
3200 uint32 buffSize,
void * buffer,
3203 return ::GetGlyphOutline(
GetAttributeHDC(), chr, format, &gm, buffSize,
3204 buffer,
const_cast<MAT2*
>(&mat2));
3249 return ::GetCharWidth(
GetAttributeHDC(), firstChar, lastChar, buffer);
3294inline int TDC::EnumFonts(LPCTSTR faceName, OLDFONTENUMPROC callback,
void * data)
const
3296 return ::EnumFonts(
GetAttributeHDC(), faceName, callback, LPARAM(data));
3307 return ::GetCharABCWidths(
GetAttributeHDC(), firstChar, lastChar, abc);
3323 return ::EnumFontFamilies(
GetAttributeHDC(), familyName, callback, LPARAM(data));
3351 return ::BeginPath(
GetHDC());
3368 return ::CloseFigure(
GetHDC());
3377 return ::EndPath(
GetHDC());
3387 return ::FlattenPath(
GetHDC());
3408 return ::WidenPath(
GetHDC());
3419 return ::FillPath(
GetHDC());
3428 return ::StrokePath(
GetHDC());
3439 return ::StrokeAndFillPath(
GetHDC());
3459 return ::SelectClipPath(
GetHDC(), mode);
3468 return ::PathToRegion(
GetHDC());
3477 HMETAFILE mf = ::CloseMetaFile(
GetHDC());
3500 HENHMETAFILE emf = ::CloseEnhMetaFile(
GetHDC());
3516 return ::GdiComment(
GetHDC(), bytes,
reinterpret_cast<const BYTE*
>(data));
3675 return ::Escape(
GetHDC(),
esc, count,
reinterpret_cast<LPCSTR
>(inData), outData);
3688 return ::SetAbortProc(
GetHDC(), proc);
3700 DocInfo.lpszDocName =
const_cast<LPTSTR
>(docName);
3701 DocInfo.lpszOutput =
const_cast<LPTSTR
>(output);
3703#if (WINVER >= 0x0400)
3704 DocInfo.lpszDatatype =
nullptr;
3707 return ::StartDoc(
GetHDC(), &DocInfo);
3719 return ::StartPage(
GetHDC());
3730 return Escape(BANDINFO,
sizeof(
TBandInfo),
nullptr,
reinterpret_cast<LPTSTR
>(&bandInfo));
3748 return Escape(NEXTBAND, 0,
nullptr,
reinterpret_cast<void*
>(&rect));
3766 return ::EndPage(
GetHDC());
3780 return ::AbortDoc(
GetHDC());
3792 return ::EndDoc(
GetHDC());
3802 return Escape(QUERYESCSUPPORT,
sizeof(
int), &escapeNum);
3814 return Escape(SETCOPYCOUNT,
sizeof(
int), &reqestCopies, &actualCopies);
#define PRECONDITION(condition)
TBitmap is the GDI bitmap class derived from TGdiObject.
The GDI Brush class is derived from TGdiObject.
TClientDC(HWND wnd)
Creates a TClientDC object with the given owned window.
Class wrapper for management of color values.
COLORREF GetValue() const
Get a 32bit COLORREF type from this color object.
TCreatedDC(LPCTSTR driver, LPCTSTR device, const DEVMODE *initData=nullptr)
Creates a device context (DC) object for the device specified by driver (driver name) and device (dev...
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TDC is the root class for GDI DC wrappers.
int GetBkMode() const
Returns the background mode of this DC, either OPAQUE or TRANSPARENT.
int GetTextFaceLength() const
Retrieves the length of the typeface name for the current font on this DC.
HBITMAP CreateDIBSection(const BITMAPINFO &info, uint usage, void **bits, HANDLE section=0, uint32 offset=0)
Create a fast DIB under Win32.
bool FrameRect(int x1, int y1, int x2, int y2, const TBrush &brush)
Draws a border on this DC around the given rectangle, rect, using the given brush,...
uint SetTextAlign(uint flags)
Sets the text-alignment flags for this DC.
int ExcludeUpdateRgn(HWND wnd)
Prevents drawing within invalid areas of a window by excluding an updated region of this DC's window ...
bool FillSolidRect(const TRect &r, const TColor &color)
int GetTextFace(int count, TCHAR *facename) const
Retrieves the typeface name for the current font on this DC.
int OffsetClipRgn(const TPoint &delta)
Moves the clipping region of this DC by the x- and y-offsets specified in delta.
TStyle
Enumeration describing hilevel border styles.
@ ButtonDn
Button in down position.
@ Recessed
Status field style recessed.
@ WndRecessed
Input field & other window recessed.
@ WellSet
Well option set (auto grows + 1) // !CQ W4 cant do.
@ Grooved
Grouping groove.
@ WndRaised
Raised window outer+inner edge.
@ None
No border painted at all.
@ ButtonUp
Button in up position.
@ Raised
Status field style raised.
@ Embossed
Grouping raised emboss bead.
@ ButtonDn3x
Button in down position, Win 3.x style.
@ Plain
Plain plain window frame.
@ ButtonUp3x
Button in up position, Win 3.x style.
TEdge
Enumeration describing the type of edge to be drawn.
@ EdgeOuter
Mask for outer edge bits.
@ EdgeEtched
Outer sunken, inner raised.
@ RaisedInner
Raised inner edge only.
@ SunkenInner
Sunken inner edge only.
@ EdgeSunken
Both inner & outer sunken.
@ EdgeBump
Outer raised, inner sunken.
@ SunkenOuter
Sunken outer edge only.
@ EdgeRaised
Both inner & outer raised.
@ RaisedOuter
Raised outer edge only.
@ EdgeInner
Mask for inner edge bits.
TColor GetBkColor() const
Returns the current background color of this DC.
virtual bool TextOut(int x, int y, const tstring &str, int count=-1)
Draws up to count characters of the given null-terminated string in the current font on this DC.
int EnumFonts(const tstring &facename, OLDFONTENUMPROC callback, void *data) const
TDC(HDC handle)
use an existing DC, doesn't auto delete it
TPoint GetWindowOrg() const
Places in point the x- and y-coordinates of the origin of the window associated with this DC.
bool Arc(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Draws an elliptical arc on this DC using the currently selected pen object.
bool GetCharWidth(uint firstChar, uint lastChar, int *buffer)
Retrieves the widths in logical units for a consecutive sequence of characters in the current font fo...
bool MoveTo(int x, int y)
Moves the current position of this DC to the given x- and y-coordinates or to the given point.
int ExcludeClipRect(const TRect &rect)
Creates a new clipping region for this DC.
int EnumFontFamilies(const tstring &family, FONTENUMPROC proc, void *data) const
bool Chord(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Draws and fills a chord (a region bounded by the intersection of an ellipse and a line segment) on th...
bool PlayEnhMetaFile(const TEnhMetaFilePict &metaFile, const TRect *rect)
Play the enhanced metafile onto this device context.
bool StrokeAndFillPath()
Closes any open figures in the current path of this DC, strokes the outline of the path using the cur...
bool FloodFill(const TPoint &point, const TColor &color)
Fills an area on this DC starting at point and using the currently selected brush object.
bool FlattenPath()
Transforms any curves in the currently selected path of this DC.
bool InvertRgn(const TRegion ®ion)
Inverts the given region, on this DC.
bool FrameRgn(const TRegion ®ion, const TBrush &brush, const TSize &brushSize)
Draws a border on this DC around the given region, region, using the given brush, brush.
bool PolylineTo(const TPoint *points, int count)
Draws one or more connected line segments on this DC using the currently selected pen object.
bool SetBrushOrg(const TPoint &origin, TPoint *oldOrg=nullptr)
Sets the origin of the currently selected brush of this DC with the given origin value.
bool FillRgn(const TRegion ®ion, const TBrush &brush)
Fills the given region on this DC using the specified brush.
bool PolyBezierTo(const TPoint *points, int count)
Draws one or more connected cubic Beziers splines through the points specified in the points array us...
bool GetBrushOrg(TPoint &point) const
Places in point the current brush origin of this DC.
bool PaintRgn(const TRegion ®ion)
Paints the given rectangle using the currently selected brush for this DC.
TColor SetPixel(int x, int y, const TColor &color)
Sets the color of the pixel at the given location to the given color and returns the pixel's previous...
bool DrawCursor(int x, int y, const TCursor &cursor)
bool SetWorldTransform(XFORM &xform)
Sets a two-dimensional linear transformation, given by the xform structure, between world space and p...
int GetPolyFillMode() const
Returns the current polygon-filling mode for this DC, either ALTERNATE or WINDING.
TSize GetViewportExt() const
The first version retrieves this DC's current viewport's x- and y-extents (in device units) and place...
TEXTMETRIC GetTextMetrics() const
Functional style overload.
bool PtVisible(const TPoint &point) const
Returns true if the given point lies within the clipping region of this DC; otherwise,...
bool TransparentBlt(const TRect &dst, const TDC &srcDC, const TRect &src, const TColor &transparent)
Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the speci...
bool GetTextExtent(const tstring &str, int stringLen, TSize &size) const
Computes the extent (width and height) in logical units of the text line consisting of stringLen char...
int SetDIBitsToDevice(const TRect &dst, const TPoint &src, uint startScan, uint numScans, const void *bits, const BITMAPINFO &bitsInfo, uint16 usage)
The first version sets the pixels in dst (the given destination rectangle on this DC) from the source...
bool GetAspectRatioFilter(TSize &size) const
Retrieves the setting of the current aspect-ratio filter for this DC.
bool FillRect(int x1, int y1, int x2, int y2, const TBrush &brush)
Fills the given rectangle on this DC using the specified brush.
bool PolyPolygon(const TPoint *points, const int *PolyCounts, int count)
Using the current pen and polygon-filling mode, draws and fills on this DC the number of closed polyg...
bool BeginPath()
Opens a new path bracket for this DC and discards any previous paths from this DC.
int SetSystemPaletteUse(int usage)
Changes the usage of this DC's system palette.
int GetTextCharacterExtra() const
If successful, returns the current intercharacter spacing, in logical units, for this DC; otherwise,...
int RemoveClipRgn()
Removes the device context's clipping region.
bool GetDCOrg(TPoint &point) const
Obtains the final translation origin for this device context and places the value in point.
bool DPtoLP(TPoint *points, int count=1) const
Converts each of the count points in the points array from device points to logical points.
int GetKerningPairs(int pairs, KERNINGPAIR *krnPair)
Retrieves kerning pairs for the current font of this DC up to the number specified in pairs and copie...
bool Polyline(const TPoint *points, int count)
Using the current pen object, draws on this DC a count of line segments (there must be at least 2).
TFlag
Which edge(s) to draw. ctor defaults to all 4.
@ Diagonal
Draw diagonal edge (NotAvail intrnl).
@ Adjust
Adjust passed rect to client (Not Applicable).
@ Soft
Soft edge look for buttons.
@ Flat
Flat instead of 3d for use in non-3d windows.
int EnumObjects(uint objectType, GOBJENUMPROC proc, void *data) const
Enumerates the pen or brush objects available for this DC.
int SetDIBits(TBitmap &bitmap, uint startScan, uint numScans, const void *bits, const BITMAPINFO &Info, uint16 usage)
The first version sets the pixels in bitmap (the given destination bitmap on this DC) from the source...
bool WidenPath()
Redefines the current, closed path on this DC as the area that would be painted if the path were stro...
bool SetTextJustification(int breakExtra, int breakCount)
When text strings are displayed using TDC::TextOut and TDC::ExtTextOut, sets the number of logical un...
bool SetMiterLimit(float newLimit, float *oldLimit=nullptr)
Sets the limit of miter joins to newLimit and puts the previous value in oldLimit.
int EnumFonts(LPCTSTR faceName, OLDFONTENUMPROC callback, void *data) const
Enumerates the fonts available on this DC for the given faceName.
int EnumEnhMetaFile(const TEnhMetaFilePict &metaFile, ENHMFENUMPROC callback, void *data, const TRect *rect) const
Enumerate through the enhanced metafile records.
virtual bool ExtTextOut(int x, int y, uint16 options, const TRect *r, const tstring &str, int count=-1, const int *dx=nullptr)
Draws up to count characters of the given null-terminated string in the current font on this DC.
int SetROP2(int mode)
Sets the current foreground mix mode mode of this DC to the given mode value and returns the previous...
bool LPtoDP(TPoint *points, int count=1) const
Converts each of the count points in the points array from logical points to device points.
bool TextRect(int x1, int y1, int x2, int y2)
Fills the given rectangle, clipping any text to the rectangle.
bool DrawFocusRect(int x1, int y1, int x2, int y2)
Draws the given rectangle on this DC in the style used to indicate focus.
virtual HDC GetAttributeHDC() const
Returns the attributes of the DC object.
uint SetBoundsRect(TRect &bounds, uint flags)
Controls the accumulation of bounding rectangle information for this DC.
tstring GetTextFace() const
virtual TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
int IntersectClipRect(const TRect &rect)
Creates a new clipping region for this DC's window by forming the intersection of the current region ...
void UpdateColors()
Updates the client area of this DC by matching the current colors in the client area to the system pa...
TSize GetWindowExt() const
Retrieves this DC's window current x- and y-extents (in device units).
uint32 GetGlyphOutline(uint chr, uint format, GLYPHMETRICS &gm, uint32 buffSize, void *buffer, const MAT2 &mat2)
Retrieves TrueType metric and other data for the given character, chr, on this DC and places it in gm...
bool Rectangle(int x1, int y1, int x2, int y2)
Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
virtual bool TabbedTextOut(const TPoint &p, const tstring &str, int count, int numPositions, const int *positions, int tabOrigin, TSize &size)
Draws up to count characters of the given null-terminated string in the current font on this DC.
bool Pie(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Using the currently selected pen and brush objects, draws and fills a pie-shaped wedge by drawing an ...
TPoint GetViewportOrg() const
The first version sets in the point argument the x- and y-extents (in device-units) of this DC's view...
int SelectClipRgn(const TRegion ®ion)
Selects the given region as the current clipping region for this DC.
bool RectVisible(const TRect &rect) const
Returns true if any part of the given rectangle, rect, lies within the clipping region of this DC; ot...
uint GetOutlineTextMetrics(uint data, OUTLINETEXTMETRIC &otm)
Retrieves metric information for TrueType fonts on this DC and copies it to the given array of OUTLIN...
int GetClipRgn(TRegion ®ion) const
Retrieves this DC's current clip-region and, if successful, places a copy of it in the region argumen...
bool LineTo(int x, int y)
Draws a line on this DC using the current pen object.
void RestoreObjects()
Restores all the original GDI objects to this DC.
bool FillPath()
Closes any open figures in the current path of this DC and fills the path's interior using the curren...
TColor GetPixel(int x, int y) const
Returns the color of the pixel at the given location.
int GetStretchBltMode() const
Returns the current stretching mode for this DC: BLACKONWHITE, COLORONCOLOR, or WHITEONBLACK.
bool GetTabbedTextExtent(const tstring &str, int stringLen, int numPositions, const int *positions, TSize &size) const
Computes the extent (width and height) in logical units of the text line consisting of stringLen char...
uint GetSystemPaletteEntries(int start, int num, PALETTEENTRY *entries) const
Retrieves a range of up to num palette entries, starting at start, from the system palette to the ent...
int GetDIBits(const TBitmap &bitmap, uint startScan, uint numScans, void *bits, const BITMAPINFO &info, uint16 usage)
The first version retrieves some or all of the bits from the given bitmap on this DC and copies them ...
bool PolyDraw(const TPoint *points, uint8 *types, int count)
Using the currently selected pen object, draws one or more possibly disjoint sets of line segments or...
int SetPolyFillMode(int mode)
Description Sets the polygon-filling mode for this DC to the given mode value, either ALTERNATE or WI...
bool ModifyWorldTransform(XFORM &xform, uint32 mode)
Changes the current world transformation for this DC using the given xform and mode arguments.
HRGN PathToRegion()
If successful, returns a region created from the closed path in this DC; otherwise,...
bool BitBlt(int dstX, int dstY, int w, int h, const TDC &srcDC, int srcX, int srcY, uint32 rop=SRCCOPY)
Performs a bit-block transfer from srcDc (the given source DC) to this DC (the destination DC).
bool PlgBlt(const TPoint *points, const TDC &srcDC, const TRect &src, const TBitmap &maskBm, const TPoint &maskPos)
Performs a bit-block transfer from the given source DC to this DC.
bool StrokePath()
Renders the current, closed path on this DC and uses the DC's current pen.
bool PolyBezier(const TPoint *points, int count)
Draws one or more connected cubic Bezier splines through the points specified in the points array usi...
bool DrawIcon(int x, int y, const TIcon &icon)
Draws the given icon on this DC.
TColor GetNearestColor(const TColor &color) const
Returns the color nearest to the given Color argument for the current palette of this DC.
int EnumMetaFile(const TMetaFilePict &metaFile, MFENUMPROC callback, void *data) const
Enumerates the GDI calls within the given metaFile.
bool Ellipse(int x1, int y1, int x2, int y2)
Draws and fills an ellipse on this DC using the currently selected pen and brush objects.
uint32 SetMapperFlags(uint32 flag)
Alters the algorithm used by the font mapper when mapping logical fonts to physical fonts on this DC.
bool SelectClipPath(int mode)
Selects the current path on this DC as a clipping region, combining any existing clipping region usin...
TColor GetTextColor() const
Returns the current text color of this DC.
bool ExtFloodFill(const TPoint &point, const TColor &color, uint16 fillType)
Fills an area on this DC starting at point and using the currently selected brush object.
void PlayEnhMetaFileRecord(HANDLETABLE &handletable, ENHMETARECORD &metaRecord, uint count)
Play one record from the enhanced metafile onto this DC.
uint GetTextAlign() const
If successful, returns the current text-alignment flags for this DC; otherwise, returns the value GDI...
int EnumFontFamilies(LPCTSTR family, FONTENUMPROC proc, void *data) const
Enumerates the fonts available to this DC in the font family specified by family.
bool StretchBlt(int dstX, int dstY, int dstW, int dstH, const TDC &srcDC, int srcX, int srcY, int srcW, int srcH, uint32 rop=SRCCOPY)
Copies a bitmap from the source DC to a destination rectangle on this DC specified either by upper le...
int SelectClipRgn(HRGN r=0)
Selects the given region as the current clipping region for the device context.
bool PlayMetaFile(const TMetaFilePict &metaFile)
Plays the contents of the given metaFile on this DC.
int RealizePalette()
Maps to the system palette the logical palette entries selected into this DC.
int SetBkMode(int mode)
Sets the background mode to the given mode argument, which can be either OPAQUE or TRANSPARENT.
bool IsDC() const
Validation routine - used mainly for diagnostic purposes.
uint32 GetFontData(uint32 table, uint32 offset, void *buffer, long data)
Retrieves font-metric information from a scalable TrueType font file (specified by table and starting...
int StretchDIBits(const TRect &dst, const TRect &src, const void *bits, const BITMAPINFO &bitsInfo, uint16 usage, uint32 rop=SRCCOPY)
Copies the color data from src, the source rectangle of pixels in the given DIB (device-independent b...
bool InvertRect(int x1, int y1, int x2, int y2)
Inverts the given rectangle, rect, on this DC.
bool GetCharABCWidths(uint firstChar, uint lastChar, ABC *abc)
Retrieves the widths of consecutive characters in the range firstChar to lastChar from the current Tr...
bool ScrollDC(int x, int y, const TRect &scroll, const TRect &clip, TRegion &updateRgn, TRect &updateRect)
Scrolls a rectangle of bits horizontally by x (or delta.x in the second version) device-units,...
bool PatBlt(int x, int y, int w, int h, uint32 rop=PATCOPY)
bool GetCurrentPosition(TPoint &point) const
Reports in point the logical coordinates of this DC's current position.
bool PolyPolyline(const TPoint *points, const int *PolyCounts, int count)
Using the currently selected pen object, draws on this DC the number of polylines (connected line seg...
HANDLE Handle
< make this function available to derivatives
bool RoundRect(int x1, int y1, int x2, int y2, int x3, int y3)
Draws and fills a rounded rectangle of the given size on this DC with the current pen and brush objec...
TRect GetClipBox() const
Places the current clip box size of this DC in rect.
int SetStretchBltMode(int mode)
Sets the stretching mode of this DC to the given mode value and returns the previous mode.
uint GetSystemPaletteUse() const
Determines whether this DC has access to the full system palette.
bool MaskBlt(const TRect &dst, const TDC &srcDC, const TPoint &src, const TBitmap &maskBm, const TPoint &maskPos, uint32 rop=SRCCOPY)
Copies a bitmap from the given source DC to this DC.
bool EndPath()
Closes the path bracket and selects the path it defines into this DC.
bool CloseFigure()
Closes an open figure in this DC's open path bracket by drawing a line from the current position to t...
HDC GetHDC() const
Return the handle of the device context.
int SetTextCharacterExtra(int extra)
If successful, sets the current intercharacter spacing to extra, in logical units,...
void PlayMetaFileRecord(HANDLETABLE &handletable, METARECORD &metaRecord, int count)
Plays the metafile record given in metaRecord to this DC by executing the GDI function call contained...
bool AngleArc(int x, int y, uint32 radius, float startAngle, float sweepAngle)
Draws a line segment and an arc on this DC using the currently selected pen object.
int GetMapMode() const
If successful, returns the current window mapping mode of this DC; otherwise, returns 0.
bool Polygon(const TPoint *points, int count)
int GetROP2() const
Returns the current drawing (raster operation) mode of this DC.
bool GetBoundsRect(TRect &bounds, uint16 flags) const
Reports in bounds the current accumulated bounding rectangle of this DC or of the Windows manager,...
TDesktopDC()
Default constructor for TDesktopDC objects.
uint SetDIBColorTable(uint start, uint entries, const RGBQUAD *colors)
uint GetDIBColorTable(uint start, uint entries, RGBQUAD *colors)
bool BitBltToScreen(TDC &dstDC, const TRect &dst, const TPoint &src) const
bool StretchBltToScreen(TDC &dstDC, const TRect &dst, const TRect &src) const
Pseudo-GDI object Device Independent Bitmap (DIB) class.
uint NumScans() const
Returns the number of scans in this DIB.
uint16 Usage() const
Returns the Mode for this DIB.
const BITMAPINFO * GetInfo() const
Returns this DIB's Info field.
uint StartScan() const
Returns the starting scan line.
const void * GetBits() const
Returns the Bits data member for this DIB.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
TGdiBase()
This default constructor sets Handle to 0 and ShouldDelete to true.
void CheckValid(uint resId=IDS_GDIFAILURE)
bool ShouldDelete
Should object delete GDI handle in dtor?
HANDLE Handle
GDI handle of this object.
TIC(LPCTSTR driver, LPCTSTR device, const DEVMODE *initData=nullptr)
Creates a device information context (IC) for the device specified by driver (driver name) and device...
TIcon, derived from TGdiObject, represents the GDI object icon class.
TMemoryDC()
Constructs a screen-compatible memory DC.
TNCPaintDC(HWND wnd, HRGN hPaintRgn)
Creates a TNCPaintDC object with the given owned window.
PAINTSTRUCT Ps
The paint structure associated with this TPaintDC object.
TPaintDC(HWND wnd)
Creates a TPaintDC object with the given owned window.
HWND Wnd
The associated window handle.
TPalette is the GDI Palette class derived from TGdiObject.
TPen is derived from TGdiObject.
TPoint is a support class, derived from tagPOINT.
int AbortDoc()
Aborts the current print job on this printer and erases everything drawn since the last call to Start...
uint QueryEscSupport(int escapeNum)
Returns true if the escape specified by escapeNum is implemented on this device; otherwise false.
void SetDocInfo(const DOCINFO &docinfo)
Sets the DOCINFO structure.
int StartPage()
Prepares this device to accept data.
int Escape(int escape, int count=0, const void *inData=nullptr, void *outData=nullptr)
Allows applications to access the capabilities of a particular device that are not directly available...
TPrintDC(HDC handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TPrintDC object for the DC given by handle.
int StartDoc(LPCTSTR docName, LPCTSTR output=nullptr)
Starts a print job for the named document on this printer DC.
DOCINFO & GetDocInfo()
Return the DOCINFO structure.
int SetAbortProc(ABORTPROC proc)
Establishes the user-defined proc as the printer-abort function for this printer.
int StartDoc(const tstring &docName, const tstring &output=tstring{})
int EndDoc()
Ends the current print job on this printer.
int SetCopyCount(int reqestCount, int &actualCount)
Sets requestCount to the number of uncollated copies of each page that this printer should print.
int BandInfo(TBandInfo &bandInfo)
Retrieves information about the banding capabilities of this device, and copies it to the given bandI...
int NextBand(TRect &rect)
Tells this printer's device driver that the application has finished writing to a band.
int EndPage()
Tells this printer's device driver that the application has finished writing to a page.
TRect is a mathematical class derived from tagRect.
int Height() const
Returns the height of this rectangle (bottom - top).
int X() const
Returns the left value.
int Width() const
Returns the width of this rectangle (right - left).
int Y() const
Returns the top value.
TRegion, derived from TGdiObject, represents GDI abstract shapes or regions.
The tagSIZE struct is defined as.
TSize()
Default constructor that does nothing.
TWindowDC(HWND wnd)
Creates a TWindow object with the given owned window.
HWND Wnd
Holds a handle to the window owned by this device context.
Definition of base most abstract GDI object class, and associated exception class.
Definition of abstract GDI object class and derived classes.
Classes for window system geometry.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core).
bool SetViewportExt(HDC hdc, int w, int h)
bool SetWindowExt(HDC hdc, int w, int h)
bool SetWindowOrg(HDC hdc, int w, int h)
bool SetViewportOrg(HDC hdc, int x, int y)
Equivalent to BANDINFOSTRUCT.