mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
8361949ba1
If there are more than 7 color stops, we can split the gradient into multiple gradients with color stops like so: 0, 1, 2, 3, 4, 5, transparent transparent, 6, 7, 8, 9, 10, transparent ... transparent, n-2, n-1, n and use the new BLEND_ADD to draw them on top of each other. Adapt the testcae that tests this to use colors that work with the fancy algorithm we use now, so that BLEND_ADD and transitions to transparent do not cause issues.
24 lines
1.1 KiB
C
24 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include "gskgpushaderopprivate.h"
|
|
|
|
#include "gskrendernode.h"
|
|
|
|
#include <graphene.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
void gsk_gpu_linear_gradient_op (GskGpuFrame *frame,
|
|
GskGpuShaderClip clip,
|
|
gboolean repeating,
|
|
const graphene_rect_t *rect,
|
|
const graphene_point_t *start,
|
|
const graphene_point_t *end,
|
|
const graphene_point_t *offset,
|
|
const GskColorStop *stops,
|
|
gsize n_stops);
|
|
|
|
|
|
G_END_DECLS
|
|
|