~ubuntu-branches/ubuntu/precise/clutter-1.0/precise

« back to all changes in this revision

Viewing changes to clutter/clutter-color.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Lesser General Public License for more details.
19
19
 *
20
20
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the
22
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
 
 * Boston, MA 02111-1307, USA.
 
21
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24
22
 */
25
23
 
26
24
/**
39
37
#include "config.h"
40
38
#endif
41
39
 
 
40
#include <math.h>
 
41
 
42
42
#include <pango/pango-attributes.h>
43
43
#include <gobject/gvaluecollector.h>
44
44
 
282
282
        clr[i] = tmp1;
283
283
    }
284
284
 
285
 
  color->red   = clr[0] * 255.0;
286
 
  color->green = clr[1] * 255.0;
287
 
  color->blue  = clr[2] * 255.0;
 
285
  color->red   = floorf (clr[0] * 255.0 + 0.5);
 
286
  color->green = floorf (clr[1] * 255.0 + 0.5);
 
287
  color->blue  = floorf (clr[2] * 255.0 + 0.5);
288
288
}
289
289
 
290
290
/**