refresh frame fix, dblclk proxy viewer fix, vicon refresh fix for awdw resize, fix...
[goodguy/history.git] / cinelerra-5.1 / guicast / vframe.h
index dc14dc876f9e17d25df91ac68a01ae153872a7e7..f9a05aefa8f4595d362e7e861af244a0e65f7353 100644 (file)
@@ -34,7 +34,7 @@
 
 // Maximum number of prev or next effects to be pushed onto the stacks.
 #define MAX_STACK_ELEMENTS 255
-
+#define SHM_MIN_SIZE 2048
 
 // Scene graph for 3D models
 // Defined by the subclass
@@ -130,6 +130,7 @@ public:
 
 // direct copy with no alpha
        int copy_from(VFrame *frame);
+       int copy_vframe(VFrame *src);
 // BC_CModels::transfer
        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) {
@@ -151,7 +152,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
@@ -200,9 +201,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.
@@ -244,8 +242,6 @@ public:
 
 
 
-
-
 // ================================ OpenGL functions ===========================
 // Defined in vframe3d.C
 // Location of working image if OpenGL playback
@@ -301,11 +297,12 @@ public:
 // Adds the program with put_shader.
 // Returns the program handle.
 // Requires a null terminated argument list of shaders to link together.
+// if fragments is not NULL, it is a a zero terminated list of frags
+// if fragments is NULL, then a zero terminated list of va_args frags
 // At least one shader argument must have a main() function.  make_shader
 // replaces all the main() functions with unique functions and calls them in
 // sequence, so multiple independant shaders can be linked.
-// x is a placeholder for va_arg and should be 0.
-       static unsigned int make_shader(int x, ...);
+       static unsigned int make_shader(const char **fragments, ...);
        static void dump_shader(int shader_id);
 
 // Because OpenGL is faster if multiple effects are combined, we need
@@ -346,10 +343,20 @@ 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);
+       void draw_oval(int x1, int y1, int x2, int y2);
 
 // 3D scene graphs
 // Not integrated with shmem because that only affects codecs
@@ -457,9 +464,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