Re: [Vala] Compile error when using Cogl.Color
- From: Sam Wilson <tecywiz121 hotmail com>
- To: <a kitouni gmail com>, <mhordecki gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Compile error when using Cogl.Color
- Date: Wed, 31 Mar 2010 09:08:23 -0400
Date: Wed, 31 Mar 2010 10:43:29 +0100
From: a kitouni gmail com
To: mhordecki gmail com
CC: vala-list gnome org
Subject: Re: [Vala] Compile error when using Cogl.Color
Hi,
2010/3/29 Mike Hordecki <mhordecki gmail com>:
Hello!
I've got a following problem with my the compiler.
Given the code:
using Cogl;
void main()
{
var color = Color();
}
valac generates an incorrect constructor call, i.e.
cogl_color_new(&some_temp_var)
as opposed to cogl_color_new() which is present in the cogl's header file.
The vapi presents Cogl.Color as a struct, and this is the way to
initialize structs. A workaround (completely untested, may complain
about uninitialized variable):
Color color;
color.set_from_4ub(...);
I've always used it as
Color c = {0, 0, 0, 0};
where each zero is red, green, blue and alpha respectively
Sam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]