From 3c050000c6918b77a353583999e6e810aa675fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?llu=C3=ADs=20g=C3=B3mez=20i=20bigord=C3=A0?= Date: Wed, 24 Oct 2007 20:37:21 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r8875, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/pdvjtools/; revision=8876 --- pix_preview/pix_preview.h | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 pix_preview/pix_preview.h (limited to 'pix_preview/pix_preview.h') diff --git a/pix_preview/pix_preview.h b/pix_preview/pix_preview.h new file mode 100644 index 0000000..0124bf4 --- /dev/null +++ b/pix_preview/pix_preview.h @@ -0,0 +1,144 @@ +/*----------------------------------------------------------------- +LOG +GEM - Graphics Environment for Multimedia + +Get pixel information + +Copyright (c) 1997-1998 Mark Danks. mark@danks.org +Copyright (c) Günther Geiger. geiger@epy.co.at +Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at +Copyright (c) 2002 James Tittle & Chris Clepper +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. + +-----------------------------------------------------------------*/ + +/*----------------------------------------------------------------- +pix_preview + + 0409:forum::für::umläute:2000 + IOhannes m zmoelnig + mailto:zmoelnig@iem.kug.ac.at +-----------------------------------------------------------------*/ + +#ifndef INCLUDE_PIX_DUMP_H_ +#define INCLUDE_PIX_DUMP_H_ + +#include "Base/GemPixObj.h" + +/*needed for base64 conversion*/ +#include + +std::string base64_encode(unsigned char const* , unsigned int len); + + + + + + +/*----------------------------------------------------------------- +------------------------------------------------------------------- +CLASS + + pix_preview + + Get pixel information + + KEYWORDS + pix + + DESCRIPTION + + dumps the pix-data as a float-package + +-----------------------------------------------------------------*/ +class GEM_EXTERN pix_preview : public GemPixObj +{ + CPPEXTERN_HEADER(pix_preview, GemPixObj) + +public: + + ////////// + // Constructor + pix_preview(t_floatarg fx, t_floatarg fy); + int x_width, x_height; + +protected: + + ////////// + // Destructor + virtual ~pix_preview(); + + ////////// + // All we want is the pixel information, so this is a complete override. + virtual void processImage(imageStruct &image); + + ////////// + virtual void processYUVImage(imageStruct &image); + + ////////// + void trigger(); + + ////////// + // The color outlet + t_outlet *m_dataOut; + + ////////// + // the buffer + int xsize, ysize; // proposed x/y-sizes + int m_xsize, m_ysize; + int m_csize; + t_atom *m_buffer; + int m_bufsize; + + int oldimagex; + int oldimagey; + + ////////// + // navigation + float m_xstep; + float m_ystep; + + ///////// + // pointer to the image data + unsigned char *m_data; + + ///////// + // LLUO :: widget tk list pointer + t_glist *m_glist; + + t_widgetbehavior image_widgetbehavior; + + static void image_drawme(pix_preview *x, t_glist *glist, int firsttime); + + static void image_erase(pix_preview* x,t_glist* glist); + + +/* ------------------------ image widgetbehaviour----------------------------- */ + + + static void image_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2); + + static void image_displace(t_gobj *z, t_glist *glist, int dx, int dy); + + static void image_select(t_gobj *z, t_glist *glist, int state); + + static void image_activate(t_gobj *z, t_glist *glist, int state); + + static void image_delete(t_gobj *z, t_glist *glist); + + static void image_vis(t_gobj *z, t_glist *glist, int vis); + + +private: + + ////////// + // Static member callbacks + static void triggerMessCallback(void *dump); + static void GREYMessCallback(void *dump); + static void RGBAMessCallback(void *dump); + static void RGBMessCallback(void *dump); + +}; + +#endif // for header file -- cgit v1.2.1