X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.h;h=44695ba7074c5053e24b746997b27df79eaa698b;hb=ac1686c12c57d8e431584548e6bddee17b78497e;hp=575968916c302476241c2bd5a7d966a38cd8df5f;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index 57596891..44695ba7 100644 --- a/cinelerra-5.1/guicast/vframe.h +++ b/cinelerra-5.1/guicast/vframe.h @@ -131,7 +131,10 @@ public: // direct copy with no alpha int copy_from(VFrame *frame); // BC_CModels::transfer - int transfer_from(VFrame *frame, int bg_color=0); + int transfer_from(VFrame *frame, int bg_color, int in_x, int in_y, int in_w, int in_h); + int transfer_from(VFrame *frame, int bg_color=0) { + return transfer_from(frame, bg_color, 0,0, frame->get_w(),frame->get_h()); + } // Required for YUV int clear_frame(); int allocate_compressed_data(long bytes); @@ -148,7 +151,7 @@ public: long get_compressed_allocated() { return compressed_allocated; } long get_compressed_size() { return compressed_size; } void set_compressed_size(long size) { compressed_size = size; } - double get_timestamp() { return timestamp; } + double get_timestamp() { return timestamp; } void set_timestamp(double time) { timestamp = time; } // return an array of pointers to rows @@ -197,9 +200,6 @@ public: // Set keyframe status void set_keyframe(int value); int get_keyframe(); -// Overlay src onto this with blending and translation of input. -// Source and this must have alpha - void overlay(VFrame *src, int out_x1, int out_y1); // If the opengl state is RAM, transfer image from RAM to the texture // referenced by this frame. @@ -213,8 +213,9 @@ public: // Must be called from a synchronous opengl thread after enable_opengl. void to_texture(); -// Transfer from PBuffer to RAM. Only used after Playback3D::overlay_sync - void to_ram(); +// Transfer from PBuffer to RAM. +// used in Playback3D::overlay_sync, plugin Overlay::handle_opengl + void screen_to_ram(); // Transfer contents of current pbuffer to texture, // creating a new texture if necessary. @@ -240,8 +241,6 @@ public: - - // ================================ OpenGL functions =========================== // Defined in vframe3d.C // Location of working image if OpenGL playback @@ -342,10 +341,19 @@ public: // This clears the stacks and the param table void clear_stacks(); - void draw_rect(int x1, int y1, int x2, int y2); + int (VFrame::*draw_point)(int x, int y); + int pixel_rgb, pixel_yuv, stipple; + + void set_pixel_color(int rgb); + void set_stiple(int mask); + int draw_pixel(int x, int y); void draw_line(int x1, int y1, int x2, int y2); - void draw_pixel(int x, int y); - void draw_arrow(int x1, int y1, int x2, int y2); + void draw_smooth(int x1, int y1, int x2, int y2, int x3, int y3); + void smooth_draw(int x1, int y1, int x2, int y2, int x3, int y3); + void draw_rect(int x1, int y1, int x2, int y2); + void draw_arrow(int x1, int y1, int x2, int y2, int sz=10); + void draw_x(int x1, int y1, int sz=2); + void draw_t(int x1, int y1, int sz=2); // 3D scene graphs // Not integrated with shmem because that only affects codecs @@ -453,9 +461,11 @@ class VFramePng : public VFrame { // Read a PNG into the frame with alpha int read_png(const unsigned char *data, long image_size, double xscale, double yscale); public: - VFramePng(unsigned char *png_data, double scale=0); + VFramePng(unsigned char *png_data, double s=0); VFramePng(unsigned char *png_data, long image_size, double xs=0, double ys=0); ~VFramePng(); + static VFrame *vframe_png(int fd, double xs=1, double ys=1); + static VFrame *vframe_png(const char *png_path, double xs=1, double ys=1); }; #endif