From 2a7604a5f909115a5fd633f4a058b1890b13d7ef Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 1 Aug 2006 16:03:46 +0200 Subject: add OutputImage stuff --- src/OutputImage.H | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/OutputImage.H (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H new file mode 100644 index 0000000..4ecb0e4 --- /dev/null +++ b/src/OutputImage.H @@ -0,0 +1,59 @@ +// +// Copyright 2006 by Johannes Hofmann +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// + +#ifndef OUTPUTIMAGE_H +#define OUTPUTIMAGE_H + + +class OutputImage { + public: + OutputImage(); + + ~OutputImage(); + + virtual int init(int w, int h); + + int set_pixel(int x, char r, char g, char b); + + int next_line(); + + protected: + virtual int set_pixel_internal(int x, char r, char g, char b); + + virtual int next_line_internal(); +}; + +class OutputImages { + public: + OutputImages(); + + ~OutputImages(); + + int add(OutputImage *i); + + int remove(OutputImage *i); + + int init(int w, int h); + + int set_pixel(int x, char r, char g, char b); + + int next_line(); +} + +#endif -- cgit v1.2.3 From 97f03d296d77284c723d9ff8485fed51dc17c32c Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 1 Aug 2006 16:30:44 +0200 Subject: implement OutputImage stuff --- src/OutputImage.H | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H index 4ecb0e4..65aca92 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -22,21 +22,30 @@ class OutputImage { + private: + int w, h; + public: OutputImage(); ~OutputImage(); - virtual int init(int w, int h); + virtual int init(int w1, int h1); int set_pixel(int x, char r, char g, char b); int next_line(); + int done(); + protected: + virtual int init_internal(int w1, h1); + virtual int set_pixel_internal(int x, char r, char g, char b); virtual int next_line_internal(); + + virtual int done_internal(); }; class OutputImages { @@ -54,6 +63,8 @@ class OutputImages { int set_pixel(int x, char r, char g, char b); int next_line(); + + int done(); } #endif -- cgit v1.2.3 From d40e2b31d77face2fb65c41cc4d901f01c5de5d1 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 1 Aug 2006 22:40:33 +0200 Subject: implement JPEGOutputImage --- src/OutputImage.H | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H index 65aca92..9a99548 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -23,7 +23,7 @@ class OutputImage { private: - int w, h; + int w, h, initialized, line; public: OutputImage(); @@ -39,7 +39,7 @@ class OutputImage { int done(); protected: - virtual int init_internal(int w1, h1); + virtual int init_internal(int w1, int h1); virtual int set_pixel_internal(int x, char r, char g, char b); @@ -49,14 +49,18 @@ class OutputImage { }; class OutputImages { + private: + OutputImage **imgs; + int max_imgs; + public: OutputImages(); ~OutputImages(); - int add(OutputImage *i); + int add(OutputImage *img); - int remove(OutputImage *i); + int remove(OutputImage *img); int init(int w, int h); @@ -65,6 +69,6 @@ class OutputImages { int next_line(); int done(); -} +}; #endif -- cgit v1.2.3 From 732e18ac89479a9a789068b32145825bb0c98ba4 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 2 Aug 2006 18:00:23 +0200 Subject: implement PreviewOutputImage --- src/OutputImage.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H index 9a99548..e7ab4e5 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -23,7 +23,7 @@ class OutputImage { private: - int w, h, initialized, line; + int W, H, initialized, line; public: OutputImage(); -- cgit v1.2.3 From f2e115a29f85d8d637f2e0894532212e93691118 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 2 Aug 2006 18:06:28 +0200 Subject: cleanup --- src/OutputImage.H | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H index e7ab4e5..a7f01f5 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -23,7 +23,7 @@ class OutputImage { private: - int W, H, initialized, line; + int initialized; public: OutputImage(); @@ -39,6 +39,8 @@ class OutputImage { int done(); protected: + int W, H, line; + virtual int init_internal(int w1, int h1); virtual int set_pixel_internal(int x, char r, char g, char b); -- cgit v1.2.3 From b289453edc8c3f83824b2e2964779de0bad148a7 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 3 Aug 2006 20:53:10 +0200 Subject: remove OutputImages --- src/OutputImage.H | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/OutputImage.H') diff --git a/src/OutputImage.H b/src/OutputImage.H index a7f01f5..8792eb6 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -50,27 +50,4 @@ class OutputImage { virtual int done_internal(); }; -class OutputImages { - private: - OutputImage **imgs; - int max_imgs; - - public: - OutputImages(); - - ~OutputImages(); - - int add(OutputImage *img); - - int remove(OutputImage *img); - - int init(int w, int h); - - int set_pixel(int x, char r, char g, char b); - - int next_line(); - - int done(); -}; - #endif -- cgit v1.2.3