X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.hh;h=9e140db07d462ca956521765c5417b2a84917bc7;hb=bfea000a7407e51b5659590415e410a47f6f046b;hp=01642824b55afc5487fded4a7b0b35a0f5982e50;hpb=01a37dfe1888f1ac6da7ab12c6e4d59ce104d12c;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.hh b/otk/rendercontrol.hh index 01642824..9e140db0 100644 --- a/otk/rendercontrol.hh +++ b/otk/rendercontrol.hh @@ -26,10 +26,9 @@ 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 horizontalGradient(Surface &sf, const RenderTexture &texture) const; void diagonalGradient(Surface &sf, const RenderTexture &texture) const; void crossDiagonalGradient(Surface &sf, const RenderTexture &texture) const; virtual void drawGradientBackground(Surface &sf, @@ -37,13 +36,19 @@ 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); + static RenderControl *createRenderControl(int screen); - virtual void drawRoot(const RenderColor &color) const; - //! Draws a background onto a Surface, as specified by a RenderTexture /*! This function will overwrite the entire surface. @@ -60,6 +65,9 @@ public: virtual void drawImage(Surface &sf, int w, int h, unsigned long *data) const; + //! Draws an image onto the surface + virtual void drawImage(Surface &sf, Pixmap pixmap, Pixmap mask) const; + //! Draws a string onto a Surface virtual void drawString(Surface &sf, const Font &font, int x, int y, const RenderColor &color,