Re: gtkdatabox-0.9.0.1 grid and scale modifications
- From: "Dr. Roland Bock" <box2OO6 eudoxos de>
- To: gtkdatabox-list gnome org
- Subject: Re: gtkdatabox-0.9.0.1 grid and scale modifications
- Date: Thu, 16 Apr 2009 12:29:42 +0200
Hi Brian,
nice work!
A few remarks from my side:
*) I get a lot of warnings about log2 (which I do not really understand):
gtkdatabox.c:1036: warning: implicit declaration of function ‘log2’
gtkdatabox.c:1036: warning: incompatible implicit declaration of
built-in function ‘log2’
There are no warnings about log10 though.
*) What seems to be the problem with the priv->val style in the grid
stuff (sounds nice, btw)? Couldn't you just add the two float arrays to
the _GtkDataboxGridPrivate struct?
*) You should also add the arrays to the properties enumeration, as well
as gtk_databox_grid_set_property, gtk_databox_grid_get_property,
gtk_databox_grid_class_init, I guess.
*) Since you show this much interest, I'd like to encourage you to take
over and continue the the project on SourceForge :-)
Best regards,
Roland
Brian Phelps wrote:
Hi Dr. Bock and all on the list,
I modified gtkdatabox-0.9.0.1 to support log2 scaling and added
support for initializing the grid by passing an array of values. You
can read my updates in the Changelog and see the specific changes in
the patch
Here is the head of the Changelog:
2009-04-15 (0.9.0.2alpha)
- Added log base 2 support to the scale/ruler libraries
- In gtkdatabox.c I Copied log10 code and pasted, it
after the linear code replacing log10 calls with log2
- In gtkdatabox_grid.c, added in support for assigning grid
values, instead of the default automatic assign done heuristically
by the library.
- Uses a new API call GtkDataboxGraph *gtk_databox_grid_array_new
(gint hlines, gint vlines, gfloat *hline_vals, gfloat *vline_vals,
GdkColor * color, guint size);
- These are not done using the same coding style priv->val
because I could not figure out how to make this work properly.
Instead I used a global gfloat pointer defaulted to NULL for
these arrays. The NULL value is used to determine if grid
values are displayed from the array or heuristically
- In gtkdatabox_scale, copied log10 code and pasted, it after the linear
code replacing log10 calls with log2, pow 2
- Updated all headers to reflect new API change (see diff)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]