Merge branch 'hotfix-1.7.3' into develop

This commit is contained in:
Jinhao
2020-05-15 17:21:17 +08:00
3 changed files with 280 additions and 81 deletions

View File

@@ -1,7 +1,7 @@
/*
* An Animation Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2020 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -29,13 +29,12 @@ namespace nana
public:
/// function which builds frames.
using framebuilder = std::function<bool(std::size_t pos, paint::graphics&, nana::size&)>;
struct impl;
public:
frameset();
void push_back(paint::image); ///< Inserts frames at the end.
void push_back(framebuilder fb, std::size_t length); ///< Inserts a framebuilder and the number of frames that it generates.
private:
struct impl;
std::shared_ptr<impl> impl_;
};
/// Easy way to display an animation or create an animated GUI
@@ -68,8 +67,17 @@ namespace nana
void pause();
/// Renders the animation at a fixed position
void output(window wd, const nana::point& pos);
/// Renders the animation at a rectangle
/**
* If the size of rectangle is not equal to the size of frame, it stretches the frame for the size of rectangle.
* @param wd Output window.
* @param r Generator of the rectangle. The generator gets called every time rendering occurs.
*/
void output(window wd, std::function<nana::rectangle()> r);
void fps(std::size_t n);
std::size_t fps() const;
private: