LibreOffice Module sd (master) 1
SlsAnimationFunction.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
23
24#include <functional>
25#include <vector>
26
27
29
31{
32public:
38 const double nX1,
39 const double nY1);
40
41 ::basegfx::B2DPoint operator() (const double nT);
42
43private:
44 const double mnX1;
45 const double mnY1;
46 const double mnX2;
47 const double mnY2;
48
49 static double EvaluateComponent (
50 const double nT,
51 const double nV1,
52 const double nV2);
53};
54
61{
62public:
63 typedef ::std::function<basegfx::B2DPoint (double)> ParametricFunction;
65
66 double operator() (const double nX);
67
68private:
72 ::std::vector<double> maY;
73};
74
75} // end of namespace ::sd::slidesorter::controller
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnimationBezierFunction(const double nX1, const double nY1)
Create a cubic bezier curve whose start and end points are given implicitly as P0=(0,...
static double EvaluateComponent(const double nT, const double nV1, const double nV2)
Turn a parametric function into one whose y-Values depend on its x-Values.
::std::function< basegfx::B2DPoint(double)> ParametricFunction
::std::vector< double > maY
y-Values of the parametric function given to the constructor evaluated (and interpolated) for evenly ...
AnimationParametricFunction(const ParametricFunction &rFunction)