From e3f6e0ff8195e73f2fa8c9db431941e171dd0041 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 14 Feb 2003 19:18:19 +0000 Subject: make reduceDepth set the im->data member, with newly allocated data, so the pixelData in the surface isn't reduced --- otk/rendercontrol.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'otk/rendercontrol.hh') diff --git a/otk/rendercontrol.hh b/otk/rendercontrol.hh index 01642824..56f45c8a 100644 --- a/otk/rendercontrol.hh +++ b/otk/rendercontrol.hh @@ -26,8 +26,6 @@ protected: RenderControl(int screen); - virtual void reduceDepth(Surface &sf, XImage *im) const = 0; - inline void highlight(pixel32 *x, pixel32 *y, bool raised) const; void verticalGradient(Surface &sf, const RenderTexture &texture) const; void diagonalGradient(Surface &sf, const RenderTexture &texture) const; @@ -37,11 +35,20 @@ protected: virtual void drawSolidBackground(Surface& sf, const RenderTexture& texture) const; + //! Reduces a Surface's Surface::pixelData so that it will display correctly + //! on the screen's depth + /*! + This function allocates and sets the im->data member. The allocated memory + will be freed when XDetroyImage is called on the XImage. + */ + virtual void reduceDepth(Surface &sf, XImage *im) const = 0; + public: virtual ~RenderControl(); static RenderControl *getRenderControl(int screen); + //! Draws onto the root window virtual void drawRoot(const RenderColor &color) const; //! Draws a background onto a Surface, as specified by a RenderTexture -- cgit v1.2.3