]> Dogcows Code - chaz/openbox/blobdiff - otk/rendercontrol.hh
offsets in planar surfaces
[chaz/openbox] / otk / rendercontrol.hh
index 72ad176fa1b6b87459279e8c078df9e547b8f102..9e140db07d462ca956521765c5417b2a84917bc7 100644 (file)
@@ -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,
@@ -68,6 +76,8 @@ public:
   //! Draws a PixmapMask with a specified color onto a Surface
   virtual void drawMask(Surface &sf, const RenderColor &color,
                         const PixmapMask &mask) const;
+
+  virtual void allocateColor(XColor *color) const = 0;
 };
 
 }
This page took 0.02473 seconds and 4 git commands to generate.