Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.0 KiB

  1. #ifndef __IMGBRUSH_H__
  2. #define __IMGBRUSH_H__
  3. class CImgBrush : public CObject
  4. {
  5. public: /******************************************************************/
  6. CImgBrush();
  7. virtual ~CImgBrush();
  8. BOOL CopyTo( CImgBrush& destImgBrush );
  9. CPalette* SetBrushPalette( CDC* pdc, BOOL bForce = FALSE );
  10. HPALETTE SetBrushPalette( HDC hdc, BOOL bForce = FALSE );
  11. BOOL SetSize ( CSize newSize, BOOL bStretchToFit=TRUE );
  12. void ColorToMonoBitBlt(CDC* pdcMono, int xMono, int yMono, int cx, int cy,
  13. CDC *pdcColor, int xColor, int yColor, DWORD dwROP, COLORREF transparentColor);
  14. void RecalcMask( COLORREF transparentColor );
  15. void BltMatte ( IMG* pimg, CPoint topLeft );
  16. void BltReplace( IMG* pimg, CPoint topLeft );
  17. void BltColor ( IMG* pimg, CPoint topLeft, COLORREF color );
  18. void CenterHandle();
  19. void TopLeftHandle();
  20. CRgn m_cRgnPolyFreeHandSelBorder;
  21. CRgn m_cRgnPolyFreeHandSel;
  22. CDC m_dc;
  23. CBitmap m_bitmap;
  24. CSize m_size;
  25. CDC m_maskDC;
  26. CBitmap m_maskBitmap;
  27. HBITMAP m_hbmOld;
  28. HBITMAP m_hbmMaskOld;
  29. BOOL m_bFirstDrag;
  30. BOOL m_bLastDragWasASmear;
  31. BOOL m_bLastDragWasFirst;
  32. BOOL m_bCuttingFromImage;
  33. BOOL m_bMakingSelection;
  34. BOOL m_bMoveSel;
  35. BOOL m_bSmearSel;
  36. BOOL m_bOpaque;
  37. CRect m_rcDraggedFrom;
  38. CSize m_dragOffset;
  39. IMG* m_pImg;
  40. CRect m_rcSelection;
  41. CSize m_handle;
  42. };
  43. extern CImgBrush NEAR theImgBrush;
  44. void GetMonoBltColors(HDC hDC, HBITMAP hBM, COLORREF& crNewBk, COLORREF& crNewText);
  45. BOOL QuickColorToMono(CDC* pdcMono, int xMono, int yMono, int cx, int cy,
  46. CDC *pdcColor, int xColor, int yColor, DWORD dwROP, COLORREF crTrans);
  47. // #define DEBUGSHOWBITMAPS
  48. #if defined(DEBUGSHOWBITMAPS)
  49. void DebugShowBitmap(HDC hdcSrc, int x, int y, int wid, int hgt);
  50. #else
  51. #define DebugShowBitmap(hdc,x,y,w,h)
  52. #endif
  53. #endif // __IMGBRUSH_H__