summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_gradient_linear.c
blob: 9332178a18239c39c3a5f87d2aab802e8e6ac7b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "evas_common_private.h"
#include "evas_private.h"

#include <strings.h>

typedef struct _Evas_VG_Gradient_Linear_Data Evas_VG_Gradient_Linear_Data;
struct _Evas_VG_Gradient_Linear_Data
{
   struct {
      double x, y;
   } start, end;
};

void
_evas_vg_gradient_linear_start_set(Eo *obj EINA_UNUSED,
                                   Evas_VG_Gradient_Linear_Data *pd,
                                   double x, double y)
{
   pd->start.x = x;
   pd->start.y = y;
}

void
_evas_vg_gradient_linear_start_get(Eo *obj EINA_UNUSED,
                                   Evas_VG_Gradient_Linear_Data *pd,
                                   double *x, double *y)
{
   if (x) *x = pd->start.x;
   if (y) *y = pd->start.y;
}

void
_evas_vg_gradient_linear_end_set(Eo *obj EINA_UNUSED,
                                 Evas_VG_Gradient_Linear_Data *pd,
                                 double x, double y)
{
   pd->end.x = x;
   pd->end.y = y;
}

void
_evas_vg_gradient_linear_end_get(Eo *obj EINA_UNUSED,
                                 Evas_VG_Gradient_Linear_Data *pd,
                                 double *x, double *y)
{
   if (x) *x = pd->end.x;
   if (y) *y = pd->end.y;
}

#include "evas_vg_gradient_linear.eo.c"