2
# -*- coding: utf-8 -*-
5
# a redefinition of senses
7
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
8
__licenses__ = ["LICENSE.LGPL"]
9
__description__ = "Navigation bar base texture"
14
from cluttercairo import CairoTexture
16
class Texture(CairoTexture):
18
def __init__(self, width, height):
20
CairoTexture.__init__(self, width, height)
25
self.context = self.cairo_create()
27
linpat = cairo.LinearGradient(self.width / 2.0, 0.0, self.width / 2.0, self.height);
29
linpat.add_color_stop_rgba (0.0, 0.2, 0.2, 0.2, 1.0);
30
linpat.add_color_stop_rgba (0.4, 0.1, 0.1, 0.1, 1.0);
31
linpat.add_color_stop_rgba (0.95, 0.4, 0.4, 0.4, 1.0);
32
linpat.add_color_stop_rgba (1.0, 0.1, 0.1, 0.1, 1.0);
34
self.context.rectangle(0.0, 0.0, self.width, self.height)
36
self.context.close_path()
37
self.context.set_source(linpat)
43
def resize(self, width, height):