DrawContext::DrawContext(Window &w):
display(w.get_display()),
- window(w),
- image(0)
+ window(w)
{
#ifndef WIN32
::Display *dpy=display.get_display();
#endif
}
+unsigned DrawContext::get_depth() const
+{
+#ifdef WIN32
+ return 0;
+#else
+ return image->bits_per_pixel;
+#endif
+}
+
+unsigned char *DrawContext::get_data()
+{
+#ifdef WIN32
+ return 0;
+#else
+ return reinterpret_cast<unsigned char *>(image->data);
+#endif
+}
+
void DrawContext::update()
{
#ifndef WIN32