sprint 1-alpha
Public Member Functions | Public Attributes
sprint::gtl::TDC< tManagedDC > Class Template Reference

Inherited by sprint::gtl::CPaintDC, and sprint::gtl::CWindowDC.

List of all members.

Public Member Functions

 TDC (HDC hdc=NULL)
void Attach (HDC hDC)
HDC Detach ()
 operator HDC () const
bool IsNull () const
CBrushHandle GetCurrentBrush () const
CFontHandle GetCurrentFont () const
CBitmapHandle GetCurrentBitmap () const
void SaveDC ()
 The SaveDC function saves the current state of the specified device context (DC) by copying data describing selected objects and graphic modes (such as the bitmap, brush, palette, font, pen, region, drawing mode, and mapping mode) to a context stack.
BOOL RestoreDC (int nSavedDC)
 The RestoreDC function restores a device context (DC) to the specified state. The DC is restored by popping state information off a stack created by earlier calls to the SaveDC function.
bool FillRect (const RECT &rc, HBRUSH hbr)
bool FillRect (int x0, int y0, int x1, int y1, HBRUSH hbr)
bool FrameRect (const RECT &rc, HBRUSH hbr)
bool FrameRect (int x0, int y0, int x1, int y1, HBRUSH hbr)
bool Rectangle (const RECT &rc)
bool Rectangle (int x0, int y0, int x1, int y1)
bool Ellipse (int x0, int y0, int x1, int y1)
bool Circle (int x, int y, int r)
bool MoveTo (int x, int y, LPPOINT lpPoint=NULL)
bool MoveTo (POINT point, LPPOINT lpPointRet=NULL)
bool LineTo (int x, int y)
bool LineTo (POINT point)
bool Line (POINT a, POINT b)
 Una linea da a a b.
bool Line (int x0, int y0, int x1, int y1)
bool Polygon (LPPOINT lpPoints, int nCount)
bool Polyline (LPPOINT lpPoints, int nCount)
COLORREF SetTextColor (COLORREF rgb)
COLORREF SetTextColor (unsigned int r, unsigned int g, unsigned int b)
COLORREF GetTextColor () const
COLORREF SetBkColor (COLORREF crColor)
UINT GetTextAlign () const
UINT SetTextAlign (UINT nFlags)
int SetTextJustification (int nBreakExtra, int nBreakCount)
int GetTextCharacterExtra () const
int SetTextCharacterExtra (int nCharExtra)
BOOL DrawEdge (LPRECT lpRect, UINT nEdge, UINT nFlags)
BOOL DrawFrameControl (const RECT &lpRect, UINT nType, UINT nState)
bool TextOut (int x, int y, LPCSTR lpString, int nCount=-1)
bool TextOut (int x, int y, const std::string &lpString)
BOOL ExtTextOut (int x, int y, UINT nOptions, LPCRECT lpRect, LPCTSTR lpszString, UINT nCount=-1, LPINT lpDxWidths=NULL)
bool DrawText (LPCSTR lpString, const RECT &rc, UINT uFormat)
bool DrawText (const std::string &str, const RECT &rc, UINT uFormat)
bool GetTextExtent (LPCSTR lpString, LPSIZE lpSize) const
bool GetTextExtent (const std::string &str, LPSIZE lpSize) const
BOOL GetTextExtent (LPCTSTR lpszString, int nCount, LPSIZE lpSize) const
SIZE GetTextExtent (LPCTSTR lpszString, int nCount=-1) const
SIZE GetTextExtent (const std::string &str) const
BOOL GetTextExtentExPoint (LPCTSTR lpszString, int cchString, LPSIZE lpSize, int nMaxExtent, LPINT lpnFit=NULL, LPINT alpDx=NULL)
int SetBkMode (int mode) const
HBITMAP SelectBitmap (HBITMAP hbmp) const
 Imposta una bitmap come bitmap di default per questo context.
HBRUSH SelectBrush (HBRUSH hbr) const
 Imposta un brush di disegno per questo context.
HFONT SelectFont (HFONT hbr) const
 Imposta un font, come font di default per questo context.
HPEN SelectPen (HPEN hpen) const
 Imposta una penna di disegno per questo context.
TDC< true > CreateCompatibleDC () const
HBITMAP CreateCompatibleBitmap (int nWidth, int nHeight)
 Crea una Bitmap compatibile con il DC corrente.
void DeleteDC ()
 Forza il rilascio del DC.
bool BitBlt (int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, int nXSrc=0, int nYSrc=0, DWORD dwRop=SRCCOPY) const
 Esegue una copia di una immagine tra un DC e questo.
void BitBlt (int x, int y, HBITMAP hbmp, DWORD dwRop=SRCCOPY) const
 Permette di disegnare una Bitmap in questo context in (x,y)

Public Attributes

HDC m_hdc

template<bool tManagedDC>
class sprint::gtl::TDC< tManagedDC >


Member Function Documentation

template<bool tManagedDC>
bool sprint::gtl::TDC< tManagedDC >::BitBlt ( int  nXDest,
int  nYDest,
int  nWidth,
int  nHeight,
HDC  hdcSrc,
int  nXSrc = 0,
int  nYSrc = 0,
DWORD  dwRop = SRCCOPY 
) const

Esegue una copia di una immagine tra un DC e questo.

Parameters:
nXDestx-coordinate of destination rectangle’s upper-left corner
nYDesty-coordinate of destination rectangle’s upper-left corner
nWidthwidth of destination rectangle
nHeightheight of destination rectangle
hdcSrchandle to source device context
nXSrcx-coordinate of source rectangle’s upper-left corner
nYSrcy-coordinate of source rectangle’s upper-left corner
dwRopraster operation code
template<bool tManagedDC>
TDC<true> sprint::gtl::TDC< tManagedDC >::CreateCompatibleDC ( ) const

CreateCompatibleDC wrapper Crea un DC compatibile con il DC corrente

template<bool tManagedDC>
bool sprint::gtl::TDC< tManagedDC >::FillRect ( const RECT &  rc,
HBRUSH  hbr 
)

FillRect: fill a full box

 ps.FillRect(rc, (HBRUSH) ::GetStockObject(BLACK_BRUSH));
template<bool tManagedDC>
bool sprint::gtl::TDC< tManagedDC >::Polygon ( LPPOINT  lpPoints,
int  nCount 
)

The Polygon function draws a polygon consisting of two or more vertices connected by straight lines. The polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode.

template<bool tManagedDC>
bool sprint::gtl::TDC< tManagedDC >::Polyline ( LPPOINT  lpPoints,
int  nCount 
)

The Polyline function draws a series of line segments by connecting the points in the specified array

template<bool tManagedDC>
int sprint::gtl::TDC< tManagedDC >::SetBkMode ( int  mode) const

Set the paint mode (for TextOut and Rectangle)

Parameters:
modecan be TRANSPARENT or OPAQUE
template<bool tManagedDC>
bool sprint::gtl::TDC< tManagedDC >::TextOut ( int  x,
int  y,
LPCSTR  lpString,
int  nCount = -1 
)

TextOut wrapper Disegna del testo con il font corrente in (x,y)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines