summaryrefslogtreecommitdiff
path: root/mbone/vic/patches/patch-av
blob: b21f10651b9116e7119fa8536f8dc6881237ad01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-av,v 1.2 2006/02/27 15:49:56 joerg Exp $

--- color-mono.cc.orig	1995-11-14 02:14:31.000000000 +0000
+++ color-mono.cc
@@ -200,7 +200,7 @@ public:
 	~MonoColorModel();
 	virtual int alloc_grays();
 	virtual int command(int argc, const char*const* argv);
-	inline white(void) { return (white_); }
+	inline int white(void) { return (white_); }
 private:
 	int white_;
 };
@@ -243,14 +243,17 @@ typedef void (MonoWindowRenderer::*MonoM
 class MonoWindowRenderer : public WindowDitherer {
 public:
 	MonoWindowRenderer(VideoWindow* vw, int decimation, MonoColorModel& cm) :
-		WindowDitherer(vw, decimation), cm_(cm) { }
+		WindowDitherer(vw, decimation), cm_(cm), method_(NULL) { }
 	void render(const u_char* frm, int off, int x, int w, int h) {
-		(this->*method_)(frm, off, x, w, h);
+		if (this->method_)
+			(this->*method_)(frm, off, x, w, h);
+		else
+			dither_null(frm, off, x, w, h);
 	}
 protected:
 	MonoColorModel& cm_;
 	virtual void update();
-	virtual void disable() { method_ = WindowDitherer::dither_null; }
+	virtual void disable() { method_ = NULL; }
 	MonoMethod method_;
 	void dither(const u_char* frm, u_int off, u_int x,
 		    u_int width, u_int height) const;