Lines Matching refs:gradient

70    } gradient;  member
167 memcpy(map, p->gradient.color_data, sizeof(VGint)*1024); in create_gradient_texture()
207 paint->gradient.spread = VG_COLOR_RAMP_SPREAD_PAD; in paint_create()
208 memcpy(paint->gradient.linear.coords, def_ling, in paint_create()
210 memcpy(paint->gradient.radial.vals, def_radg, in paint_create()
213 paint->gradient.sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; in paint_create()
214 paint->gradient.sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; in paint_create()
215 paint->gradient.sampler.min_img_filter = PIPE_TEX_MIPFILTER_NEAREST; in paint_create()
216 paint->gradient.sampler.mag_img_filter = PIPE_TEX_MIPFILTER_NEAREST; in paint_create()
217 paint->gradient.sampler.normalized_coords = 1; in paint_create()
220 &paint->gradient.sampler, in paint_create()
229 pipe_sampler_view_reference(&paint->gradient.sampler_view, NULL); in paint_destroy()
235 free(paint->gradient.ramp_stopsi); in paint_destroy()
236 free(paint->gradient.ramp_stops); in paint_destroy()
271 map[0] = paint->gradient.linear.coords[2] - paint->gradient.linear.coords[0]; in paint_linear_gradient_buffer()
272 map[1] = paint->gradient.linear.coords[3] - paint->gradient.linear.coords[1]; in paint_linear_gradient_buffer()
286 matrix_translate(&mat, -paint->gradient.linear.coords[0], -paint->gradient.linear.coords[1]); in paint_linear_gradient_buffer()
304 const VGfloat *center = &paint->gradient.radial.vals[0]; in paint_radial_gradient_buffer()
305 const VGfloat *focal = &paint->gradient.radial.vals[2]; in paint_radial_gradient_buffer()
306 VGfloat rr = paint->gradient.radial.vals[4]; in paint_radial_gradient_buffer()
392 paint->gradient.num_stops = num; in paint_set_ramp_stops()
394 free(paint->gradient.ramp_stops); in paint_set_ramp_stops()
395 paint->gradient.ramp_stops = malloc(sizeof(VGfloat)*num); in paint_set_ramp_stops()
396 memcpy(paint->gradient.ramp_stops, stops, sizeof(VGfloat)*num); in paint_set_ramp_stops()
418 create_gradient_data(stops, num / 5, paint->gradient.color_data, in paint_set_ramp_stops()
421 if (paint->gradient.sampler_view) { in paint_set_ramp_stops()
422 pipe_sampler_view_reference(&paint->gradient.sampler_view, NULL); in paint_set_ramp_stops()
423 paint->gradient.sampler_view = NULL; in paint_set_ramp_stops()
426 paint->gradient.sampler_view = create_gradient_sampler_view(paint); in paint_set_ramp_stops()
452 memcpy(paint->gradient.linear.coords, coords, sizeof(VGfloat) * 4); in paint_set_linear_gradient()
458 paint->gradient.spread = mode; in paint_set_spread_mode()
461 paint->gradient.sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; in paint_set_spread_mode()
464 paint->gradient.sampler.wrap_s = PIPE_TEX_WRAP_REPEAT; in paint_set_spread_mode()
467 paint->gradient.sampler.wrap_s = PIPE_TEX_WRAP_MIRROR_REPEAT; in paint_set_spread_mode()
474 return paint->gradient.spread; in paint_spread_mode()
480 memcpy(paint->gradient.radial.vals, values, sizeof(VGfloat) * 5); in paint_set_radial_gradient()
533 memcpy(stops, paint->gradient.ramp_stops, sizeof(VGfloat)*num); in paint_ramp_stops()
539 memcpy(coords, paint->gradient.linear.coords, sizeof(VGfloat)*4); in paint_linear_gradient()
545 memcpy(coords, paint->gradient.radial.vals, sizeof(VGfloat)*5); in paint_radial_gradient()
550 return paint->gradient.num_stops; in paint_num_ramp_stops()
584 paint->gradient.color_ramps_premultiplied = set; in paint_set_color_ramp_premultiplied()
589 return paint->gradient.color_ramps_premultiplied; in paint_color_ramp_premultiplied()
596 free(paint->gradient.ramp_stopsi); in paint_set_ramp_stopsi()
597 paint->gradient.ramp_stopsi = malloc(sizeof(VGint)*num); in paint_set_ramp_stopsi()
598 memcpy(paint->gradient.ramp_stopsi, stops, sizeof(VGint)*num); in paint_set_ramp_stopsi()
605 memcpy(stops, paint->gradient.ramp_stopsi, sizeof(VGint)*num); in paint_ramp_stopsi()
611 memcpy(paint->gradient.linear.coordsi, coords, sizeof(VGint) * 4); in paint_set_linear_gradienti()
617 memcpy(coords, paint->gradient.linear.coordsi, sizeof(VGint)*4); in paint_linear_gradienti()
623 memcpy(paint->gradient.radial.valsi, values, sizeof(VGint) * 5); in paint_set_radial_gradienti()
629 memcpy(coords, paint->gradient.radial.valsi, sizeof(VGint)*5); in paint_radial_gradienti()
645 if (paint->gradient.sampler_view) { in paint_bind_samplers()
646 paint->gradient.sampler.min_img_filter = image_sampler_filter(ctx); in paint_bind_samplers()
647 paint->gradient.sampler.mag_img_filter = image_sampler_filter(ctx); in paint_bind_samplers()
648 samplers[0] = &paint->gradient.sampler; in paint_bind_samplers()
649 sampler_views[0] = paint->gradient.sampler_view; in paint_bind_samplers()
687 vals = paint->gradient.linear.coords; in paint_is_degenerate()
693 vals = paint->gradient.radial.vals; in paint_is_degenerate()