]> icculus.org git repositories - dana/openbox.git/blob - otk/pseudorendercontrol.cc
start on the rendering images code
[dana/openbox.git] / otk / pseudorendercontrol.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #include "config.h"
4
5 #include "pseudorendercontrol.hh"
6 #include "display.hh"
7 #include "screeninfo.hh"
8 #include "surface.hh"
9 #include "rendertexture.hh"
10
11 extern "C" {
12 #ifdef    HAVE_STDLIB_H
13 #  include <stdlib.h>
14 #endif // HAVE_STDLIB_H
15
16 #include "../src/gettext.h"
17 #define _(str) gettext(str)
18 }
19
20 namespace otk {
21
22 PseudoRenderControl::PseudoRenderControl(int screen)
23   : RenderControl(screen)
24 {
25   printf("Initializing PseudoColor RenderControl\n");
26 }
27
28 PseudoRenderControl::~PseudoRenderControl()
29 {
30   printf("Destroying PseudoColor RenderControl\n");
31 }
32
33 void PseudoRenderControl::drawBackground(Surface& sf,
34                                        const RenderTexture &texture) const
35 {
36   assert(_screen == sf._screen);
37   assert(_screen == texture.color().screen());
38
39   // in psuedo color, gradients aren't even worth while! just draw a solid!
40   //if (texture.gradient() == RenderTexture::Solid) {
41   drawSolidBackground(sf, texture);
42 }
43
44 void PseudoRenderControl::drawImage(Surface &sf, int w, int h,
45                                     unsigned long *data) const
46 {
47 }
48
49 }