summaryrefslogtreecommitdiff
path: root/src/cairo-pattern.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-12-24 07:22:39 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-12-24 07:22:39 -0500
commit1df5969ef67fe305f6764446e39dd7d62891c8fc (patch)
tree7b5bb36446d90a0df8fa7f1aed4728f3e235fb5d /src/cairo-pattern.c
parent12cd2bcbb260f4ed64a72b64bd2fdd593f683bbc (diff)
downloadcairo-1df5969ef67fe305f6764446e39dd7d62891c8fc.tar.gz
Document whether colors are premultiplied
For the various APIs that take or return RGBA colors, make it explicit that they are unpremultiplied.
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r--src/cairo-pattern.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 6bd3edfd8..e969f0a17 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -681,6 +681,8 @@ slim_hidden_def (cairo_pattern_create_rgb);
* 1. If the values passed in are outside that range, they will be
* clamped.
*
+ * The color is specified in the same way as in cairo_set_source_rgb().
+ *
* Return value: the newly created #cairo_pattern_t if successful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -4160,6 +4162,8 @@ _cairo_pattern_equal (const cairo_pattern_t *a, const cairo_pattern_t *b)
*
* Gets the solid color for a solid color pattern.
*
+ * Note that the color and alpha values are not premultiplied.
+ *
* Return value: %CAIRO_STATUS_SUCCESS, or
* %CAIRO_STATUS_PATTERN_TYPE_MISMATCH if the pattern is not a solid
* color pattern.
@@ -4242,6 +4246,8 @@ cairo_pattern_get_surface (cairo_pattern_t *pattern,
* where n is the number returned
* by cairo_pattern_get_color_stop_count().
*
+ * Note that the color and alpha values are not premultiplied.
+ *
* Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_INVALID_INDEX
* if @index is not valid for the given pattern. If the pattern is
* not a gradient pattern, %CAIRO_STATUS_PATTERN_TYPE_MISMATCH is
@@ -4549,6 +4555,8 @@ slim_hidden_def (cairo_mesh_pattern_get_path);
* Valid values for @corner_num are from 0 to 3 and identify the
* corners as explained in cairo_pattern_create_mesh().
*
+ * Note that the color and alpha values are not premultiplied.
+ *
* Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_INVALID_INDEX
* if @patch_num or @corner_num is not valid for @pattern. If
* @pattern is not a mesh pattern, %CAIRO_STATUS_PATTERN_TYPE_MISMATCH