#ifndef SHAPEWIPE_H
#define SHAPEWIPE_H
+class ShapeWipeConfig;
class ShapeWipeMain;
class ShapeWipeWindow;
+class ShapeWipeW2B;
+class ShapeWipeB2W;
+class ShapeWipeTumble;
+class ShapeWipeFeather;
+class ShapeWipeShape;
+class ShapeWipePreserveAspectRatio;
+class ShapePackage;
+class ShapeUnit;
+class ShapeEngine;
#include "overlayframe.inc"
#include "pluginvclient.h"
ShapeWipeWindow *window;
};
-class ShapeWipeShape : public BC_PopupTextBox
+class ShapeWipeFeather : public BC_FSlider
{
public:
- ShapeWipeShape(ShapeWipeMain *client,
- ShapeWipeWindow *window,
- int x,
- int y,
- int text_w,
- int list_h);
+ ShapeWipeFeather(ShapeWipeMain *client,
+ ShapeWipeWindow *window, int x, int y);
+ char *get_caption();
int handle_event();
+
ShapeWipeMain *client;
ShapeWipeWindow *window;
};
-class ShapeWipeAntiAlias : public BC_CheckBox
+class ShapeWipeShape : public BC_PopupTextBox
{
public:
- ShapeWipeAntiAlias(ShapeWipeMain *plugin,
- ShapeWipeWindow *window,
- int x,
- int y);
+ ShapeWipeShape(ShapeWipeMain *client, ShapeWipeWindow *window,
+ int x, int y, int text_w, int list_h);
int handle_event();
- ShapeWipeMain *plugin;
+ ShapeWipeMain *client;
ShapeWipeWindow *window;
};
-
class ShapeWipePreserveAspectRatio : public BC_CheckBox
{
public:
ShapeWipeMain *plugin;
ShapeWipeW2B *left;
ShapeWipeB2W *right;
-// ShapeWipeFilename *filename_widget;
ShapeWipeTumble *shape_tumbler;
ShapeWipeShape *shape_text;
+ ShapeWipeFeather *shape_feather;
ArrayList<BC_ListBoxItem*> shapes;
};
+class ShapeWipeConfig
+{
+public:
+ ShapeWipeConfig();
+ ~ShapeWipeConfig();
+ void read_xml(KeyFrame *keyframe);
+ void save_xml(KeyFrame *keyframe);
+
+ int direction;
+ float feather;
+ int preserve_aspect;
+ char shape_name[BCTEXTLEN];
+};
+
class ShapeWipeMain : public PluginVClient
{
public:
ShapeWipeMain(PluginServer *server);
~ShapeWipeMain();
-// required for all realtime plugins
- int load_configuration();
- int process_realtime(VFrame *incoming, VFrame *outgoing);
- void save_data(KeyFrame *keyframe);
- void read_data(KeyFrame *keyframe);
- PluginClientWindow* new_window();
+ PLUGIN_CLASS_MEMBERS(ShapeWipeConfig)
+ int process_realtime(VFrame *input, VFrame *output);
int uses_gui();
int is_transition();
- const char* plugin_title();
- int read_pattern_image(int new_frame_width, int new_frame_height);
+ void read_data(KeyFrame *keyframe);
+ void save_data(KeyFrame *keyframe);
+
+ int read_pattern_image(char *shape_name,
+ int new_frame_width, int new_frame_height);
void reset_pattern_image();
void init_shapes();
+ VFrame *input, *output;
+ ShapeEngine *engine;
ArrayList<char*> shape_paths;
ArrayList<char*> shape_titles;
int shapes_initialized;
- int direction;
- char filename[BCTEXTLEN];
- char last_read_filename[BCTEXTLEN];
- char shape_name[BCTEXTLEN];
+ int threshold;
+ char current_filename[BCTEXTLEN];
char current_name[BCTEXTLEN];
unsigned char **pattern_image;
unsigned char min_value;
unsigned char max_value;
int frame_width;
int frame_height;
- int antialias;
int preserve_aspect;
int last_preserve_aspect;
};
+
+class ShapePackage : public LoadPackage
+{
+public:
+ ShapePackage();
+ int y1, y2;
+};
+
+class ShapeUnit : public LoadClient
+{
+public:
+ ShapeUnit(ShapeEngine *server);
+ ~ShapeUnit();
+ void process_package(LoadPackage *package);
+ ShapeEngine *server;
+ unsigned char threshold;
+};
+
+class ShapeEngine : public LoadServer
+{
+public:
+ ShapeEngine(ShapeWipeMain *plugin,
+ int total_clients, int total_packages);
+ ~ShapeEngine();
+
+ void init_packages();
+ LoadClient *new_client();
+ LoadPackage *new_package();
+ ShapeWipeMain *plugin;
+};
+
#endif