~ubuntu-branches/ubuntu/trusty/python-enable/trusty

« back to all changes in this revision

Viewing changes to enthought/kiva/agg/src/kiva_gradient.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2010-02-28 14:56:36 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100228145636-9ghfhe3uy37tt3q6
Tags: 3.3.0-1
* New upstream release
* Bump Standards-Version to 3.8.4
* Switch to source format 3.0
* Update patches/freetype2.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
}
10
10
 
11
11
gradient::gradient(gradient_type_e gradient_type, std::vector<point> points,
12
 
                    std::vector<gradient_stop> stops, const char* spread_method) :
 
12
                    std::vector<gradient_stop> stops, const char* spread_method,
 
13
                    const char* units) :
13
14
    points(points),
14
15
    stops(stops),
15
16
    gradient_type(gradient_type),
16
17
    spread_method(pad)
17
18
{
18
 
    if (spread_method == "reflect")
 
19
    if (strcmp(spread_method, "reflect") == 0)
19
20
        this->spread_method = kiva::reflect;
20
 
    else if (spread_method == "repeat")
 
21
    else if (strcmp(spread_method, "repeat") == 0)
21
22
        this->spread_method = kiva::repeat;
 
23
 
 
24
    if (strcmp(units, "userSpaceOnUse") == 0)
 
25
        this->units = kiva::user_space;
 
26
    else
 
27
                this->units = kiva::object_bounding_box;
22
28
}
23
29
 
24
30
gradient::~gradient()