Commit Graph

77 Commits

Author SHA1 Message Date
Rémi Verschelde 46ef52162e Color: Rename `to_srgb`/`to_linear` to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
Hugo Locurcio 1c343cd54d Expose Color's `to_linear()` and `to_srgb()` to scripting 2022-03-28 12:17:55 +02:00
Rémi Verschelde 8ed8a7a22b doc: Sync missing Color value update after #59229
Missed in CI as the Mono build where this is checked is temporarily disabled.
2022-03-17 19:53:10 +01:00
Yuri Roubinsky 32f2c47356 Remove generating of null comparison operators from documentation 2022-03-14 22:35:23 +03:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
TechnicalSoup d5ea8547d6 Correct C# code example in Color class reference
Correct C# example code for html method in the Color class reference.
2022-02-09 20:26:51 +11:00
TechnicalSoup acd562be5d Add method descriptions to Color Class Reference
Add definitions and code examples for the html and html_is_valid methods
2022-02-08 16:37:11 +11:00
Haoyu Qiu 3ec5a5fb5c Alpha channel indicates opacity, not transparency 2021-12-24 16:52:15 +08:00
Haoyu Qiu 1fb59d13c2 Fix font preview text color on light background 2021-12-18 00:34:28 +08:00
Rémi Verschelde 471e7cbfc7
Merge pull request #54581 from aaronfranke/operator-docs 2021-11-16 14:10:09 +01:00
Rémi Verschelde e2e9b08cc7
Color: Bind `from_hsv` as static method 2021-11-11 11:50:02 +01:00
Aaron Franke 813466b3c8
Add documentation to operators for math types
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2021-11-04 14:44:55 -05:00
Aaron Franke 6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
George Marques 455e142d37
Allow comparing equality between builtin types and null 2021-09-17 12:33:52 -03:00
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
Michael Alexsander Silva Dias 0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Aaron Franke 2e13e3ed4a
Allow clamping vectors and colors 2021-06-03 12:05:20 -04:00
Rémi Verschelde bcbd480c32
Merge pull request #45144 from dalexeev/color-consts
Rename color constants (alternative)
2021-05-07 12:22:49 +02:00
kleonc d13cfc8d62 Docs: Minor argument names fix 2021-04-23 15:46:51 +02:00
Rémi Verschelde 4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
Aaron Franke f55445079a
Replace ColorN and from HTML with a string constructor 2021-02-01 17:27:19 -05:00
Danil Alexeev a97f1a3dc6 Rename color constants (alternative)
Named color constants renamed to UPPERCASE. Unlike #41019, this PR
is complete and implements these changes in the simplest way possible.

Co-authored-by: Shivam Mukherjee <mshivam98@gmail.com>
2021-01-26 19:07:00 +03:00
Rémi Verschelde 215d18814e
doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
Aaron Franke 5465e604bb
Improve argument names for core types 2020-12-07 05:01:33 -05:00
Rémi Verschelde 1a001ad964
doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01:00
Aaron Franke 4b272b18ea
Improve comments in Color documentation 2020-11-13 23:31:19 -05:00
Rémi Verschelde 64e893deac
doc: Sync classref to add operators after #43419 2020-11-10 15:00:50 +01:00
Rémi Verschelde 0f249f5c0a
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
Rémi Verschelde 52c1b5fc41
Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
2020-11-06 10:17:12 +01:00
Rémi Verschelde 424cd00f8b
doc: Sync classref with current source + fixup some bindings
Includes various changes triggered by the refactoring of method bindings.
2020-11-04 15:38:26 +01:00
Hugo Locurcio 7adb6b91b3
Remove `Color.contrasted()` as its behavior is barely useful
Returning the most contrasting color isn't a trivial task, as there
are often many possible choices. It's usually best left for the user
to implement using a script.
2020-11-03 04:46:08 -05:00
Aaron Franke 439be614f4
Link to demos from within the class reference 2020-10-01 23:57:21 -04:00
HaSa1002 ae873ab822 Translate GDScript Code Examples to C# (C)
Translates Code Examples in classes beginning with `C`.

Includes:
 * Callable
 * CanvasItem
 * CharFXTransform
 * Color
 * ColorRect
 * ConfigFile
 * ConfirmationDialog
 * Control
 * Crypto
2020-09-26 11:48:37 +02:00
Hugo Locurcio de49085567
Reference the Color constants cheatsheet in the class reference 2020-09-23 23:48:37 +02:00
Aaron Franke ecd6a893b4
Change Color HTML conversion from ARGB to RGBA
Also add support for 3 and 4 digit values in C#. Now it actually matches the HTML/CSS spec.
2020-09-01 02:07:35 -04:00
Aaron Franke 83e324d670
Update core documentation to match recent C# changes
Also a few minor API changes like adding AABB.abs()

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-07-21 14:44:53 -04:00
Hugo Locurcio 227f12478d
Document how Vector2, Vector3 and Color behave in a boolean context
See #39731.
2020-06-21 17:16:10 +02:00
Aaron Franke 90df1d67cb
Color with alpha constructor 2020-04-29 14:41:12 -04:00
Aaron Franke 540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
Nannaquin 06aeff3044 Add reference of Color8 function to Color class documentation 2020-04-05 11:34:47 -04:00
Rémi Verschelde 788765709d DocData: Fix serialization of Variant default values
Co-authored-by: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
2020-03-09 10:52:44 +01:00
Rémi Verschelde 386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
Hanif Bin Ariffin 7bc1dc828f Remove deprecated Color::gray
It was marked to be removed in Godot 3.1.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-02-12 11:22:33 +01:00
clayjohn 57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
Rémi Verschelde 2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Rémi Verschelde cbdbfb00ca doc: Document named color constants
Busywork but it's good for our completion rate :)
2020-01-26 12:08:16 +01:00
Michael Alexsander c4745c96d7 Remove unnecessary extra spaces before comments in code examples. 2020-01-23 14:41:49 -03:00
Aaron Franke 3231fca934
Add docs for is_equal_approx on structures 2019-11-30 16:52:27 -05:00
Rémi Verschelde 1f76229378 doc: Sync classref with current source 2019-11-08 08:33:48 +01:00