bltcanvas.h 845 B

1234567891011121314151617181920212223242526
  1. #ifndef _BLTCANVAS_H
  2. #define _BLTCANVAS_H
  3. #include "canvas.h"
  4. class BltCanvas : public Canvas
  5. {
  6. public:
  7. BltCanvas();
  8. BltCanvas(int width, int height, OSWINDOWHANDLE wnd);
  9. // override blit and stretchblit so we can use CGContextDrawLayerAtPoint/CGContextDrawLayerInRect
  10. virtual void blit(int srcx, int srcy, Canvas *dest, int dstx, int dsty, int dstw, int dsth);
  11. void blitToRect(ifc_canvas *canvas, RECT *src, RECT *dst, int alpha = 255);
  12. virtual void stretchblit(int srcx, int srcy, int srcw, int srch, Canvas *dest, int dstx, int dsty, int dstw, int dsth);
  13. void stretchToRectAlpha(ifc_canvas *canvas, RECT *src, RECT *dst, int alpha = 255);
  14. void DestructiveResize(int w, int h, int nb_bpp = 32); // resizes the bitmap, destroying the contents
  15. void fillBits(ARGB32 color);
  16. protected:
  17. CGLayerRef layer;
  18. };
  19. #endif