533 Commits

Author SHA1 Message Date
Jonathan Thomas
9bf25f40a9 Merge pull request #392 from ferdnyc/juce-guard-remove
Remove JUCE defines
2020-01-02 14:41:43 -06:00
FeRD (Frank Dana)
c11b4ac266 EffectBase: Remove unused short_name 2019-12-19 07:59:30 -05:00
FeRD (Frank Dana)
fd78be6b95 Remove JUCE defines
A few headers contained #defines that were intended to work around
issues with the JUCE library headers, but those things are best
handled in other ways.
2019-12-18 23:55:16 -05:00
Daniel Jour
6f71736c6a Keyframe: mark all non-modifying member functions const
Member functions that do not (need to) modify any members or internal
state of the Keyframe class should be declared as const.
2019-11-25 10:29:58 +01:00
Daniel Jour
edf85dda78 Keyframe: use = default to specify default constructor 2019-11-25 10:23:45 +01:00
Daniel Jour
3b2e262821 Keyframe: New implementation calculating values ondemand
- GetValue() calculates the value at the given position now ondemand,
  without caching values as previously.  First, it uses binary search
  to find the segment (start and end point) containing the given
  position.  Constant and linear interpolation are straightforward,
  bezier curves are calculating by binary search between the end
  points until a point on the curve is found with a X coordinate close
  enough to the given position. That points Y coordinate is returned.

- IsIncreasing(), GetRepeatFraction(), GetDelta() use GetValue()
  instead of accessing the (removed) Values vector.

- Removed now unused private functions, and the unused public
  Process().

First test results show good performance improvements for the
"rendering case" (setting up the keyframe points at once, then getting
all values) and drastic performance improvements for the "preview
case" (changing keyframe points, mixed with getting values).
2019-11-22 22:37:06 +01:00
Daniel Jour
6d81033bff Keyframe::GetPoint() returns a constant reference now
Returning a non constant reference is not possible; this allows
outside code to invalidate internal invariants (sorted order of
points) by modifying the returned point.  To make updates the current
best approach is to remove the point by index, and then add it again.
2019-11-22 00:36:52 +01:00
Daniel Jour
504ea0c1ff Make Keyframe::Values and Keyframe::Points vectors private
The Values vector should only be accessed from the outside through the
GetValue() function.  The Points vector should only be accessed using
the AddPoint(), RemovePoint(), .. functions.

This helps maintain internal invariants (e.g. keeping Points sorted)
and allows for future removal / lazy evaluation of Values.

The size() of the vectors had been accessed from various parts of the
code; the GetLength() (for Values) and GetCount() (for Points) member
functions provide access to this information and are already part of
the public API.
2019-11-19 23:43:28 +01:00
Daniel Jour
cb5574180e Keyframe::AddPoint() add at correct index, keeping Points ordered
AddPoint() now searches (binary search) for the best place to insert a
new point, thus always maintaining the order of Points.  Therefore,
ReorderPoints() is no longer needed.

CAVEAT: This breaks if some outside code changes (the public member)
Points!
2019-11-19 22:43:34 +01:00
Jonathan Thomas
272f004c0e Merge pull request #296 from OpenShot/std-prefixes
Remove all 'using namespace' directives from headers
2019-11-17 16:18:14 -06:00
FeRD (Frank Dana)
7bbec4c51c Fix documentation for Qt(Text/Html)Reader
- Some parameters were changed from documented list
- Hash signs need to be escaped if they're not references (links)
2019-11-17 01:49:49 -05:00
SuslikV
87c06feda1 Clarify some comments 2019-11-02 20:04:58 +02:00
FeRD (Frank Dana)
2535588ad8 Prefixing fixes for QtHtml/QtText Readers 2019-10-30 03:43:11 -04:00
Frank Dana
cbdd02fe7a Merge branch 'develop' into std-prefixes 2019-10-29 20:45:08 -04:00
Frank Dana
76725d9d2e Merge pull request #305 from jeffski/qt-text-html-readers
QtTextReader and QtHtmlReader
2019-10-29 20:40:51 -04:00
Frank Dana
969e8320e6 Merge branch 'develop' into std-prefixes 2019-10-29 16:06:55 -04:00
FeRD (Frank Dana)
bcc62f900c Fix juce:: prefixing 2019-10-27 03:56:13 -04:00
Frank Dana
196d56b5d1 Merge branch 'develop' into qt-text-html-readers 2019-10-25 13:49:12 -04:00
Frank Dana
8bde07682c Merge branch 'develop' into std-prefixes 2019-10-22 21:00:27 -04:00
Jonathan Thomas
56b1126c21 Merge pull request #302 from ferdnyc/svg-path-check
QtImageReader: Safer ReSVG file extension checks
2019-10-22 17:30:35 -05:00
Frank Dana
febc2fbc7d Merge pull request #333 from ferdnyc/Version-impl
Version information: Separate implementation, add pythonic touches
2019-10-11 21:57:38 -04:00
Frank Dana
ca885d59e0 Merge pull request #315 from ferdnyc/exception-default-args
Exceptions: Make (most) file_path args optional
2019-10-11 21:46:43 -04:00
Frank Dana
335c0cba1f Merge pull request #303 from ferdnyc/use-std-stoll
Use std::stoll to convert JSON values
2019-10-02 01:29:59 -04:00
Jeff Shillitto
33f16d3a55 Use QFont instead of setting parameters 2019-09-21 21:11:29 +10:00
FeRD (Frank Dana)
c422f4f245 Separate GetVersion impl, make Pythonic 2019-09-21 01:43:30 -04:00