![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphLabel — Graph label
#define GWY_GRAPH_LABEL_NORTHEAST #define GWY_GRAPH_LABEL_NORTHWEST #define GWY_GRAPH_LABEL_SOUTHEAST #define GWY_GRAPH_LABEL_SOUTHWEST #define GWY_GRAPH_POINT_SQUARE #define GWY_GRAPH_POINT_CROSS #define GWY_GRAPH_POINT_CIRCLE #define GWY_GRAPH_POINT_STAR #define GWY_GRAPH_POINT_TIMES #define GWY_GRAPH_POINT_TRIANGLE_UP #define GWY_GRAPH_POINT_TRIANGLE_DOWN #define GWY_GRAPH_POINT_DIAMOND typedef GwyGraphAreaCurveParams; typedef GwyGraphLabelParams; struct GwyGraphLabel; GtkWidget* gwy_graph_label_new (); void gwy_graph_label_set_visible (GwyGraphLabel *label, gboolean is_visible); void gwy_graph_label_set_style (GwyGraphLabel *label, GwyGraphLabelParams style); void gwy_graph_label_add_curve (GwyGraphLabel *label, GwyGraphAreaCurveParams *params); void gwy_graph_label_clear (GwyGraphLabel *label); void gwy_graph_draw_point (GdkWindow *window, GdkGC *gc, gint i, gint j, gint type, gint size, GdkColor *color, gboolean clear);
GObject +----GtkObject +----GtkWidget +----GwyGraphLabel
GwyGraphLabel implements AtkImplementorIface.
This widget should be probabaly used only within the GwyGraph widget. It plots a curves legend.
typedef struct { gint is_line; gint is_point; gint point_size; gint point_type; GdkLineStyle line_style; gint line_size; GString *description; GdkColor color; gpointer reserved1; gpointer reserved2; } GwyGraphAreaCurveParams;
typedef struct { gboolean is_frame; gint frame_thickness; gint position; PangoFontDescription *font; gpointer reserved1; gpointer reserved2; } GwyGraphLabelParams;
GtkWidget* gwy_graph_label_new ();
creates new graph label.
Returns : | new graph label |
void gwy_graph_label_set_visible (GwyGraphLabel *label, gboolean is_visible);
label: | |
is_visible: |
void gwy_graph_label_set_style (GwyGraphLabel *label, GwyGraphLabelParams style);
label: | |
style: |
void gwy_graph_label_add_curve (GwyGraphLabel *label, GwyGraphAreaCurveParams *params);
Adds a curve description to label. All the information is in structure params, including line/dots sizes and text of added curve label.
label: | label to be changed |
params: | curve parameters |
void gwy_graph_label_clear (GwyGraphLabel *label);
Clears label - removes all the curve descriptions.
label: | label to be cleared |
void gwy_graph_draw_point (GdkWindow *window, GdkGC *gc, gint i, gint j, gint type, gint size, GdkColor *color, gboolean clear);
Plots a point of requested parameters on the screen.
window: | widget window |
gc: | Graphical context |
i: | x position on the screen |
j: | y position on the screen |
type: | type of point (square, circle, etc.) |
size: | size of point |
color: | color of point |
clear: | clear window part under symbol |
<< GwyGraphCorner | GwyGraph >> |