diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-14 19:18:19 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-14 19:18:19 +0000 |
| commit | e3f6e0ff8195e73f2fa8c9db431941e171dd0041 (patch) | |
| tree | 138b580fd1d5d831f22554e9338e1ee9fbec051b /otk/rendercontrol.hh | |
| parent | 53b5c60a5e8bbf2942ef174c2db64db6cdac3e26 (diff) | |
make reduceDepth set the im->data member, with newly allocated data, so the pixelData in the surface isn't reduced
Diffstat (limited to 'otk/rendercontrol.hh')
| -rw-r--r-- | otk/rendercontrol.hh | 11 |
1 files changed, 9 insertions, 2 deletions
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 |
