~osomon/moovida/subtitle_size

« back to all changes in this revision

Viewing changes to elisa-plugins/elisa/plugins/pigment/graph/quad.py

  • Committer: Florian Boucault
  • Date: 2009-11-17 22:58:05 UTC
  • mfrom: (1462.2.22 transition)
  • Revision ID: florian@boucault.net-20091117225805-vtw7gkskmngbff8v
Removed a number of direct references to 'pgm' in order to allow multiple
implementations of its API, one using Pigment 0.3 and one using Pigment 0.5
in the near future. It also tries to facilitate the writing of the
implementation based on Pigment 0.5.

Changes in details:

 - For Pigment constants: relevant 'import pgm' replaced with
   'elisa.plugins.pigment.graph import [SPECIFIC CONSTANTS]' (look at
   elisa-plugins/elisa/plugins/pigment/graph/init.py).
 - For Pigment key symbols: relevant 'import pgm' replaced with 'from
   elisa.plugins.pigment import keysyms' (look at
   elisa-plugins/elisa/plugins/pigment/graph/keysyms.py)
 - Occurences of elisa.plugins.pigment.graph.image.Image have been
   replaced with the newly introduced elisa.plugins.pigment.graph.quad.Quad
   which should be used when only a background color is needed, not loading an
   actual picture; it is API compatible with future Pigment 0.5 quad geometry
   and has a 'color' property.
 - elisa.plugins.pigment.graph.node.Node is not a gobject anymore, instead
   elisa.plugins.pigment.graph.group.Group is: that was not used anywhere else
   and conflicting with Pigment 0.5.

Note: The transition is not complete and a few references to 'pgm' are left.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# Moovida - Home multimedia server
 
3
# Copyright (C) 2006-2009 Fluendo Embedded S.L. (www.fluendo.com).
 
4
# All rights reserved.
 
5
#
 
6
# This file is available under one of two license agreements.
 
7
#
 
8
# This file is licensed under the GPL version 3.
 
9
# See "LICENSE.GPL" in the root of this distribution including a special
 
10
# exception to use Moovida with Fluendo's plugins.
 
11
#
 
12
# The GPL part of Moovida is also available under a commercial licensing
 
13
# agreement from Fluendo.
 
14
# See "LICENSE.Moovida" in the root directory of this distribution package
 
15
# for details on that license.
 
16
 
 
17
import pgm
 
18
from drawable import Drawable
 
19
 
 
20
class Quad(Drawable, pgm.Image):
 
21
    """
 
22
    Quad node of the scenegraph.
 
23
    """
 
24
 
 
25
    def __init__(self):
 
26
        pgm.Image.__init__(self)
 
27
        Drawable.__init__(self)
 
28
 
 
29
    def set_color(self, color):
 
30
        self.bg_color = color
 
31
 
 
32
    def get_color(self):
 
33
        return self.bg_color
 
34
 
 
35
    color = property(fget=get_color, fset=set_color)