ES-DE/external/rlottie/src/vector/vbitmap.h

98 lines
3.5 KiB
C
Raw Normal View History

/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef VBITMAP_H
#define VBITMAP_H
#include "vrect.h"
#include <vsharedptr.h>
V_BEGIN_NAMESPACE
class VBitmap {
public:
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
enum class Format : uint8_t {
Invalid,
Alpha8,
ARGB32,
ARGB32_Premultiplied
};
VBitmap() = default;
VBitmap(size_t w, size_t h, VBitmap::Format format);
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
VBitmap(uint8_t *data, size_t w, size_t h, size_t bytesPerLine,
VBitmap::Format format);
void reset(uint8_t *data, size_t w, size_t h, size_t stride,
VBitmap::Format format);
void reset(size_t w, size_t h, VBitmap::Format format=Format::ARGB32_Premultiplied);
size_t stride() const;
size_t width() const;
size_t height() const;
size_t depth() const;
VBitmap::Format format() const;
bool valid() const;
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
uint8_t * data();
uint8_t * data() const;
VRect rect() const;
VSize size() const;
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
void fill(uint32_t pixel);
void updateLuma();
private:
struct Impl {
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
std::unique_ptr<uint8_t[]> mOwnData{nullptr};
uint8_t * mRoData{nullptr};
uint32_t mWidth{0};
uint32_t mHeight{0};
uint32_t mStride{0};
uint8_t mDepth{0};
VBitmap::Format mFormat{VBitmap::Format::Invalid};
explicit Impl(size_t width, size_t height, VBitmap::Format format)
{
reset(width, height, format);
}
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
explicit Impl(uint8_t *data, size_t w, size_t h, size_t bytesPerLine,
VBitmap::Format format)
{
reset(data, w, h, bytesPerLine, format);
}
VRect rect() const { return VRect(0, 0, mWidth, mHeight);}
VSize size() const { return VSize(mWidth, mHeight); }
size_t stride() const { return mStride; }
size_t width() const { return mWidth; }
size_t height() const { return mHeight; }
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
uint8_t * data() { return mRoData ? mRoData : mOwnData.get(); }
VBitmap::Format format() const { return mFormat; }
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
void reset(uint8_t *, size_t, size_t, size_t, VBitmap::Format);
void reset(size_t, size_t, VBitmap::Format);
Squashed 'external/rlottie/' changes from bf3d272df..875626965 875626965 Check border of color table while generating gradient d1636c7b4 Ignore animations with objects of unspecified type f3eed9a33 add formal parameter void to lottie_init() and lottie_shutdown() 519bd08b0 Add lottie_init() and lottie_shutdown() c api. 447cb7dd1 replace unsigned int with uint32_t in Int() d7cf0a5ab replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. 16beec845 lottiemodel: Improve opacity calculation for gradient stop 327fb7dba Reject reversed frames 625bc4c48 Finite loop in VBezier::tAtLength() ddbc9dce7 rlottie/capi: Add missing multiply for Path c0e16e571 Check Layer.mExtra and Transform.mExtra before dereferencing 9f78532c8 Avoid access to last element of empty mChildren vector 4e08acd8c remove RAPIDJSON_ASSERT() by placing the parser in error state 7affa78fe Fix dereferencing of null pointer in model::Layer::solidColor() getter 9d17ff8e6 Skip dash array of size one or zero f379dfe15 add the /inc folder as an include path at build time 194b31736 Improve matte rendering performance for simple layer 7c5b40cbb CMake: fix MSVC warnings fa44b753e fix compileing error 41f906480 On windows, stbi__fopen opens a path containing non-English characters or symbols will fail due to encoding problems, so the filename parameter is assumed to be utf-8 and converted to utf-16, and then call _wfopen_s or _wfopen 29b391b95 add lottie_configure_model_cache_size() c api 3cd00151c Fix comparison bd4c4e1f8 MT and MTd c593b57eb Remove link warnings on MSVC 132ca0a00 #include "fix" for rust-bindgen c9780b46d Fix CMake build in subdirectory 1cb2021d6 Fix crash when path animation data is empty ad9beaec6 Added support for RoundedCornor objects. a41bd7383 rlottie: draw line if width or height is 0 ed94baf14 resource: polish player png image. 9b4c4d2af resource: add rlottie_player image. 2d7b1fa2b Fixed build with GCC 11. 9cd9a6e95 vs2019: Add release build option d733e953b updated AUTHORS fc760ef92 updated AUTHORS d92d4aaf6 wasm: Add extra functions for lottie animation to use them in rlottie viewer 09662b89d updated AUTHORS 71fbff5d5 example/win32Player: removed unnecessary files. d25911e6c add app executables 538dfd9aa rename directory rlottiePlayer to win32Player 6fbb67d49 fix openJSONFileDialog 85856dff3 fix animation replace error f86e97d65 fix animation bitmap size to be set dynamically 55815b2cb move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. 9a71eeca9 add an example of win32 app that play rlottie animation by vs2019 619320cbb add rlottiePlayer Project 4884e0e9b Modify: Update .gitignore 3ebf0c7e3 Docs: Fix README typo 502cc3638 updated license in spec file. e812ba9e9 Docs: Fix README typo c98ec565d Update README.md 33295c22f Fixed README typo 073224e69 fixed readme typo ff8ddfc49 ci: upgrade windows build chain to VS2017 10c1055a3 fixed sign extension warning 98ed2620a build: use shared_module instead of shared_library git-subtree-dir: external/rlottie git-subtree-split: 875626965959d8e269ca22175c8e1ad190696c43
2022-01-07 17:43:06 +00:00
static uint8_t depth(VBitmap::Format format);
void fill(uint32_t);
void updateLuma();
};
rc_ptr<Impl> mImpl;
};
V_END_NAMESPACE
#endif // VBITMAP_H