X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmaskauto.h;h=52c3401fa5d5c75df7deb192a13a5147482c5806;hp=1bae9ab8a7a375e3d28887b9fc1becc13d3f3c14;hb=f7444a58936e4ab8fa7e7062281567cbc74e175f;hpb=c857b2fb7965d27d86d5785fb9f1b8957a871a1a diff --git a/cinelerra-5.1/cinelerra/maskauto.h b/cinelerra-5.1/cinelerra/maskauto.h index 1bae9ab8..52c3401f 100644 --- a/cinelerra-5.1/cinelerra/maskauto.h +++ b/cinelerra-5.1/cinelerra/maskauto.h @@ -44,21 +44,24 @@ public: float control_x2, control_y2; }; +#define FEATHER_MAX 100 + class SubMask { public: SubMask(MaskAuto *keyframe, int no); ~SubMask(); -// Don't use == int operator==(SubMask& ptr); int equivalent(SubMask& ptr); void copy_from(SubMask& ptr); void load(FileXML *file); void copy(FileXML *file); - void dump(); + void dump(FILE *fp); char name[BCSTRLEN]; + float fader; // 0 - 100 + float feather; // 0 - 100 ArrayList points; MaskAuto *keyframe; }; @@ -71,6 +74,7 @@ public: int operator==(Auto &that); int operator==(MaskAuto &that); + bool is_maskauto() { return true; } int identical(MaskAuto *src); void load(FileXML *file); void copy(int64_t start, int64_t end, FileXML *file, int default_auto); @@ -87,7 +91,7 @@ public: // Copy parameters to this which differ between ref & src void update_parameter(MaskAuto *ref, MaskAuto *src); - void dump(); + void dump(FILE *fp); // Retrieve submask with clamping SubMask* get_submask(int number); // Translates all submasks @@ -95,18 +99,57 @@ public: // scale all submasks void scale_submasks(int orig_scale, int new_scale); - ArrayList masks; -// These are constant for the entire track - int mode; - float feather; -// 0 - 100 - int value; int apply_before_plugins; int disable_opengl_masking; }; +class MaskCoord { public: double x, y, z; }; + +class MaskEdge : public ArrayList +{ +public: + MaskCoord &append() { return ArrayList::append(); } + MaskCoord &append(double x, double y, double z=0) { + MaskCoord &c = append(); + c.x = x; c.y = y; c.z = z; + return c; + } +}; + +// shader buffer unsized array vec only seems to work for dvec (05/2019) +class MaskSpot { public: double x, y; }; +class MaskSpots : public ArrayList +{ +public: + MaskSpot &append() { return ArrayList::append(); } + MaskSpot &append(double x, double y) { + MaskSpot &s = append(); + s.x = x; s.y = y; + return s; + } +}; +class MaskEdges : public ArrayList { +public: + MaskEdges() {} + ~MaskEdges() { remove_all_objects(); } +}; + +class MaskPointSet : public ArrayList +{ +public: + void clear() { remove_all_objects(); } + MaskPointSet() {} + ~MaskPointSet() { clear(); } +}; +class MaskPointSets : public ArrayList +{ +public: + void clear() { remove_all_objects(); } + MaskPointSets() {} + ~MaskPointSets() { clear(); } +}; #endif