summaryrefslogtreecommitdiffstats
path: root/modules/svg
Commit message (Collapse)AuthorAgeFilesLines
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-143-10/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-023-4/+4
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-3/+4
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-182-15/+14
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Use modules_enabled.gen.h to improve inter dependency checksRémi Verschelde2020-02-073-10/+6
| | | | | | | - Fix build with gdscript module disabled. Fixes #31011. - Remove unused `gdscript` compile option. - Fix build with regex module disabled. - Fix ImageLoaderSVG to forward declare thirdparty structs.
* Optimize the editor icon generationHugo Locurcio2020-01-201-5/+8
| | | | | | | | | | | | Icons are no longer upsampled when using an integer editor scale. This makes some icons slightly less crisp, but the icons themselves can be adjusted to mitigate this. When using a non-integer editor scale setting, upsampling is kept as it improves crispness in a far more visible manner. When upsampling is disabled, this speeds up the theme generation by about 100 ms on average, making the project manager and editor start slightly faster. This also speeds up switching between themes.
* Update copyright statements to 2020Rémi Verschelde2020-01-014-8/+8
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner2019-08-121-4/+2
|
* Added release function to PoolVector::Access.Ibrahn Sahir2019-07-061-1/+1
| | | | | | For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
* SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde2019-07-031-1/+1
| | | | | | | | It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
* SCons: Always use env.Prepend for CPPPATHRémi Verschelde2019-04-301-2/+2
| | | | | | Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
* SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
* Prevent upscaled SVG from exceeding Image boundsRémi Verschelde2019-01-281-0/+5
| | | | | | Also expose Image MAX_WIDTH and MAX_HEIGHT. Fixes #24455.
* Update copyright statements to 2019Rémi Verschelde2019-01-014-8/+8
| | | | Happy new year to the wonderful Godot community!
* SCons: Remove avoidable defines from main env's CPPPATHRémi Verschelde2018-10-011-2/+8
| | | | | | Also finally move freetype to its own env and disable warnings for it. Still needs some work to fix the awkward situation of the freetype and svg modules used in scene/ and editor/ respectively.
* SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-3/+4
| | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-122-6/+5
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Merge pull request #19272 from akien-mga/svg-buildsystemRémi Verschelde2018-05-301-18/+1
|\ | | | | SCons: Remove extraneous lib for SVG module
| * SCons: Remove extraneous lib for SVG moduleRémi Verschelde2018-05-301-18/+1
| | | | | | | | | | | | | | It was likely copy pasted by mistake from the freetype module, which is more complex due to its usage in the core of the engine. The SVG module does not seem to need any special treatment, apart from linking in the main env so that editor can access it.
* | SCons: Pass env to modules can_build methodRémi Verschelde2018-05-301-1/+1
|/ | | | | | This allows to disable modules based on the environment, in particular `env[tools]` which tells us if we are building the editor or not.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-054-0/+4
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-014-8/+8
| | | | Happy new year to the wonderful Godot community!
* disable caching for targets using helper functionsRhody Lugo2017-11-281-2/+1
|
* use the same cache for all branches for appveyorRhody Lugo2017-11-281-0/+2
|
* doc: Make all module docs self-containedRémi Verschelde2017-11-151-2/+0
|
* keep alpha when converting svg colors fixes #11289toger52017-09-301-1/+1
|
* Renamed function arguments to keep them consistent between declaration and ↵Wilson E. Alvarez2017-09-142-5/+5
| | | | implementation
* optimized color conversion for svg generationtoger52017-09-122-29/+40
|
* Change Color.to_32() to to_rgba32() and format as RGBAmrawlingst2017-09-071-2/+2
|
* Implement color conversion for dark SVG iconstoger52017-08-302-6/+52
|
* Make build scripts Python3 compatibleMatthias Hoelzl2017-08-271-1/+2
| | | | | | | | - The Windows, UWP, Android (on Windows) and Linux builds are tested with Scons 3.0 alpha using Python 3. - OSX and iOS should hopefully work but are not tested since I don't have a Mac. - Builds using SCons 2.5 and Python 2 should not be impacted.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-274-4/+4
|
* nanosvg: Document in COPYRIGHT.txt and thirdparty README.mdRémi Verschelde2017-08-271-2/+2
|
* Fix crashes in SVG loadingPedro J. Estébanez2017-08-221-3/+4
| | | | Adding null terminators.
* Added missing icon and svgs upscalingDaniel J. Ramirez2017-08-202-9/+12
|
* Added support for SVGDaniel J. Ramirez2017-08-206-0/+291