From 3d7eea02aa7a155b84c8c74ecbfd55a1941a9297 Mon Sep 17 00:00:00 2001 From: Comment Date: Fri, 26 Jul 2013 22:46:00 +0100 Subject: tidy files --- rotord/nodes_drawing.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 rotord/nodes_drawing.h (limited to 'rotord/nodes_drawing.h') diff --git a/rotord/nodes_drawing.h b/rotord/nodes_drawing.h deleted file mode 100644 index 11df2d6..0000000 --- a/rotord/nodes_drawing.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ROTOR_NODES_DRAWING -#define ROTOR_NODES_DRAWING - -#include "rotor.h" -#include - -namespace Rotor { - class Draw: public Image_node { - public: - Draw(){image=nullptr;}; - Draw(map &settings) { - base_settings(settings); - }; - ~Draw(){ if (image) delete image;}; - Draw* clone(map &_settings) { return new Draw(_settings);}; - Image *output(const Frame_spec &frame){ - if (image_inputs.size()) { - if (image_inputs[0]->connection){ - //copy incoming image **writable - if (image) delete image; - image=(((Image_node*)image_inputs[0]->connection)->get_output(frame))->clone(); - } - else image->setup(frame.w,frame.h); - } - else image->setup(frame.w,frame.h); //do this twice or use a goto - //draw onto new or input image - cairo_surface_t * cs = cairo_image_surface_create_for_data (image->RGBdata, - CAIRO_FORMAT_RGB24, - image->w, - image->h, - image->getStride()); - cairo_t *c=cairo_create(cs); - cairo_rectangle(c, image->w/2, image->h/2, image->w, image->h); - cairo_set_source_rgb(c, 1.0, 0.0, 0.0); - cairo_fill(c); - return image; - } - private: - Image *image; //is an image generator - }; -} - -#endif \ No newline at end of file -- cgit v1.2.3