babl r391 - in trunk: . babl
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: babl r391 - in trunk: . babl
- Date: Mon, 26 Jan 2009 08:59:14 +0000 (UTC)
Author: neo
Date: Mon Jan 26 08:59:14 2009
New Revision: 391
URL: http://svn.gnome.org/viewvc/babl?rev=391&view=rev
Log:
2009-01-26 Sven Neumann <sven gimp org>
* babl/babl.h
* babl/babl-format.c: renamed
babl_format_get_num_of_components()
to babl_format_get_n_components().
(babl_format_has_alpha): changed accordingly.
Modified:
trunk/ChangeLog
trunk/babl/babl-format.c
trunk/babl/babl.h
Modified: trunk/babl/babl-format.c
==============================================================================
--- trunk/babl/babl-format.c (original)
+++ trunk/babl/babl-format.c Mon Jan 26 08:59:14 2009
@@ -331,19 +331,18 @@
int
babl_format_has_alpha (const Babl *format)
{
+ int n = babl_format_get_n_components (format);
int i;
- int has_alpha = 0;
- for (i = 0; i < babl_format_get_num_of_components (format); i++)
+ for (i = 0; i < n; i++)
{
if (format->format.component[i]->alpha)
{
- has_alpha = 1;
- break;
+ return 1;
}
}
- return has_alpha;
+ return 0;
}
int
@@ -358,7 +357,7 @@
}
int
-babl_format_get_num_of_components (const Babl *format)
+babl_format_get_n_components (const Babl *format)
{
if (format->class_type == BABL_FORMAT)
{
Modified: trunk/babl/babl.h
==============================================================================
--- trunk/babl/babl.h (original)
+++ trunk/babl/babl.h Mon Jan 26 08:59:14 2009
@@ -103,7 +103,7 @@
/**
* Returns the number of components for the given @format.
*/
-int babl_format_get_num_of_components (const Babl *format);
+int babl_format_get_n_components (const Babl *format);
/**
* Returns the type in the given @format for the given
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]