diff --git a/src/Graphics/Graphics.cpp b/src/Graphics/Graphics.cpp index 1a02d23..acc1bee 100644 --- a/src/Graphics/Graphics.cpp +++ b/src/Graphics/Graphics.cpp @@ -293,6 +293,11 @@ CGrafPtr GetWindowPort(WindowPtr window) return window; } +PixMap* GetPortBitMapForCopyBits(CGrafPtr window) +{ + return GetImpl(window).macpmPtr; +} + Rect* GetPortBounds(CGrafPtr port, Rect* rect) { *rect = port->portRect; diff --git a/src/Pomme.h b/src/Pomme.h index a911608..78de78b 100644 --- a/src/Pomme.h +++ b/src/Pomme.h @@ -143,6 +143,9 @@ CGrafPtr GetWindowPort(WindowPtr window); Rect* GetPortBounds(CGrafPtr port, Rect* rect); +// WARNING: actual toolbox function returns BitMap*, not PixMap*! +PixMap* GetPortBitMapForCopyBits(CGrafPtr window); + // ---------------------------------------------------------------------------- // QuickDraw 2D: Pen state manipulation @@ -195,6 +198,7 @@ void DrawStringC(const char* cstr); // IM:QD:7-44 void DrawPicture(PicHandle myPicture, const Rect* dstRect); +// WARNING: Actual toolbox function takes BitMap* arguments, not PixMap*! void CopyBits( const PixMap* srcBits, PixMap* dstBits,