From: Johan Malm Date: Wed, 1 Oct 2025 19:50:31 +0000 (+0100) Subject: src/common/graphic-helpers.c: fix declaration/definition arg name difference X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bed0be8a88aa5c8a05618c97ab8385aa260ad591;p=proto%2Flabwc.git src/common/graphic-helpers.c: fix declaration/definition arg name difference --- diff --git a/src/common/graphic-helpers.c b/src/common/graphic-helpers.c index bc0adbc4..4371c9e5 100644 --- a/src/common/graphic-helpers.c +++ b/src/common/graphic-helpers.c @@ -27,34 +27,34 @@ draw_cairo_border(cairo_t *cairo, struct wlr_fbox fbox, double line_width) /* Sets the cairo color. Splits the single color channels */ void -set_cairo_color(cairo_t *cairo, const float *c) +set_cairo_color(cairo_t *cairo, const float *color) { /* * We are dealing with pre-multiplied colors * but cairo expects unmultiplied colors here */ - float alpha = c[3]; + float alpha = color[3]; if (alpha == 0.0f) { cairo_set_source_rgba(cairo, 0, 0, 0, 0); return; } - cairo_set_source_rgba(cairo, c[0] / alpha, c[1] / alpha, - c[2] / alpha, alpha); + cairo_set_source_rgba(cairo, color[0] / alpha, color[1] / alpha, + color[2] / alpha, alpha); } cairo_pattern_t * -color_to_pattern(const float *c) +color_to_pattern(const float *color) { - float alpha = c[3]; + float alpha = color[3]; if (alpha == 0.0f) { return cairo_pattern_create_rgba(0, 0, 0, 0); } - return cairo_pattern_create_rgba( - c[0] / alpha, c[1] / alpha, c[2] / alpha, alpha); + return cairo_pattern_create_rgba(color[0] / alpha, color[1] / alpha, + color[2] / alpha, alpha); } /*