diff --git a/pages/cpp_manual/interfaces/render.md b/pages/cpp_manual/interfaces/render.md index c69379c..e8c0144 100644 --- a/pages/cpp_manual/interfaces/render.md +++ b/pages/cpp_manual/interfaces/render.md @@ -381,14 +381,14 @@ The provided `name` refers to a particular shader effect type, each of which has | Shader | Parameters | | --- | --- | -| `linear-gradient` | `bool repeating`{:.value}: True if the gradient is repeating.
`Rml::Vector2f p0`{:.value}: Starting point.
`Rml::Vector2f p1`{:.value}: Ending point.
`float angle`{:.value}: The angle of the gradient line (rad).
`float length`{:.value}: The length of the gradient line (px).
`Rml::ColorStopList color_stop_list`{:.value}: Color stop list. | +| `linear-gradient` | `bool repeating`{:.value}: True if the gradient is repeating.
`Rml::Vector2f p0`{:.value}: Starting point.
`Rml::Vector2f p1`{:.value}: Ending point.
`float length`{:.value}: The length of the gradient line (px).
`Rml::ColorStopList color_stop_list`{:.value}: Color stop list. | | `radial-gradient` | `bool repeating`{:.value}: True if the gradient is repeating.
`Rml::Vector2f center`{:.value}: Center point.
`Rml::Vector2f radius`{:.value}: Two-dimensional radius.
`Rml::ColorStopList color_stop_list`{:.value}: Color stop list. | | `conic-gradient` | `bool repeating`{:.value}: True if the gradient is repeating.
`Rml::Vector2f center`{:.value}: Center point.
`float angle`{:.value}: Rotation of the gradient (rad).
`Rml::ColorStopList color_stop_list`{:.value}: Color stop list. | | `shader` | `Rml::String value`{:.value}: A user-specified value.
`Rml::Vector2f dimensions`{:.value}: Dimensions of the paint area. | Note that, the application itself, or plugins, can provide other shader types using [custom decorators](../decorators.html#custom-decorators) with their own set of parameters. The above table lists the ones that are built-in to RmlUi. -The parameters for the various `[...]-gradient` shaders have already been processed such that they are in a form suitable for rendering. In particular, the color stop lists have already been resolved, such that each color stop is given as a position with a *number* unit, where zero represents the beginning of the gradient and unity represents the end of the gradient. Specifically, the `Rml::ColorStopList` is a vector of `ColorStop` structs, having `color` and `position` members. The latter is specified as a `NumericValue` type whose unit is always a `NUMBER`{:.value}. Please see the CSS specifications for how to interpret these parameters: [`linear-gradient`{:.prop}](https://www.w3.org/TR/css-images-3/#linear-gradients), [`radial-gradient`{:.prop}](https://www.w3.org/TR/css-images-3/#radial-gradients), and [`conic-gradient`{:.prop}](https://www.w3.org/TR/css-images-4/#conic-gradients). Also, feel free to take a look at the built-in [OpenGL3 renderer](https://github.com/mikke89/RmlUi/blob/master/Backends/RmlUi_Renderer_GL3.cpp) in RmlUi, and how they are implemented there +The parameters for the various `[...]-gradient` shaders have already been processed such that they are in a form suitable for rendering. In particular, the color stop lists have already been resolved, such that each color stop is given as a position with a *number* unit, where zero represents the beginning of the gradient line and unity represents the end of the gradient line. Specifically, the `Rml::ColorStopList` is a vector of `ColorStop` structs, having `color` and `position` members. The latter is specified as a `NumericValue` type whose unit is always a `NUMBER`{:.value}. Please see the CSS specifications for how to interpret these parameters: [`linear-gradient`{:.prop}](https://www.w3.org/TR/css-images-3/#linear-gradients), [`radial-gradient`{:.prop}](https://www.w3.org/TR/css-images-3/#radial-gradients), and [`conic-gradient`{:.prop}](https://www.w3.org/TR/css-images-4/#conic-gradients). Also, feel free to take a look at the built-in [OpenGL3 renderer](https://github.com/mikke89/RmlUi/blob/master/Backends/RmlUi_Renderer_GL3.cpp) in RmlUi, and how they are implemented there The `shader` shader is a generic shader which can be given a meaning by the application. The `shader()`{:.value} decorator directly hands over the provided string as a parameter, allowing the application to render the geometry accordingly. The dimensions of the paint area is provided as a parameter, in addition, the texture coordinates of its accompanying geometry is normalized `[0, 1]` to the paint area of the decorator.