AgsCartesian

AgsCartesian — A cartesian widget

Functions

Properties

gdouble center Read / Write
gdouble font-size Read / Write
gdouble line-width Read / Write
gdouble point-radius Read / Write
gdouble x-end Read / Write
gpointer x-label Read / Write
gdouble x-label-start Read / Write
gdouble x-label-step-width Read / Write
gdouble x-margin Read / Write
gdouble x-scale-step-width Read / Write
gdouble x-start Read / Write
gdouble x-step Read / Write
gdouble x-step-width Read / Write
gchar * x-unit Read / Write
gdouble x-unit-x0 Read / Write
gdouble x-unit-y0 Read / Write
gdouble y-end Read / Write
gpointer y-label Read / Write
gdouble y-label-start Read / Write
gdouble y-label-step-height Read / Write
gdouble y-margin Read / Write
gdouble y-scale-step-height Read / Write
gdouble y-start Read / Write
gdouble y-step Read / Write
gdouble y-step-height Read / Write
gchar * y-unit Read / Write
gdouble y-unit-x0 Read / Write
gdouble y-unit-y0 Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── AgsCartesian

Implemented Interfaces

AgsCartesian implements AtkImplementorIface and GtkBuildable.

Includes

#include <ags/widget/ags_cartesian.h>

Description

AgsCartesian enables you to plot data and shows a grid pattern and some scales.

Functions

AGS_PLOT()

#define AGS_PLOT(ptr) ((AgsPlot *)(ptr))

AGS_CARTESIAN_STEP_CONVERSION_FUNC()

#define AGS_CARTESIAN_STEP_CONVERSION_FUNC(current, is_abscissae, data) ((AgsCartesianStepConversionFunc)(current, is_abscissae, data))

AGS_CARTESIAN_TRANSLATE_FUNCT()

#define AGS_CARTESIAN_TRANSLATE_FUNCT(x, y, ret_x, ret_y, data) ((AgsCartesianTranslateFunc)(x, y, ret_x, ret_y, data))

AGS_CARTESIAN_SCALE_FUNC()

#define AGS_CARTESIAN_SCALE_FUNC(value, data) ((AgsCartesianScaleFunc)(value, data))

AGS_CARTESIAN_LABEL_FUNC()

#define AGS_CARTESIAN_LABEL_FUNC(value, data) ((AgsCartesianLabelFunc)(value, data))

AgsCartesianStepConversionFunc ()

gdouble
(*AgsCartesianStepConversionFunc) (gdouble current,
                                   gboolean is_abscissae,
                                   gpointer data);

AgsCartesianTranslateFunc ()

void
(*AgsCartesianTranslateFunc) (gdouble x,
                              gdouble y,
                              gdouble *ret_x,
                              gdouble *ret_y,
                              gpointer data);

AgsCartesianScaleFunc ()

gdouble
(*AgsCartesianScaleFunc) (gdouble value,
                          gpointer data);

AgsCartesianLabelFunc ()

gchar *
(*AgsCartesianLabelFunc) (gdouble value,
                          gpointer data);

ags_plot_alloc ()

AgsPlot *
ags_plot_alloc (guint n_points,
                guint n_bitmaps,
                guint n_pixmaps);

ags_plot_free ()

void
ags_plot_free (AgsPlot *plot);

ags_cartesian_add_plot ()

void
ags_cartesian_add_plot (AgsCartesian *cartesian,
                        AgsPlot *plot);

ags_cartesian_remove_plot ()

void
ags_cartesian_remove_plot (AgsCartesian *cartesian,
                           AgsPlot *plot);

ags_cartesian_linear_step_conversion_func ()

gdouble
ags_cartesian_linear_step_conversion_func
                               (gdouble current,
                                gboolean is_abscissae,
                                gpointer data);

ags_cartesian_linear_translate_func ()

void
ags_cartesian_linear_translate_func (gdouble x,
                                     gdouble y,
                                     gdouble *ret_x,
                                     gdouble *ret_y,
                                     gpointer data);

ags_cartesian_linear_x_small_scale_func ()

gdouble
ags_cartesian_linear_x_small_scale_func
                               (gdouble value,
                                gpointer data);

ags_cartesian_linear_x_big_scale_func ()

gdouble
ags_cartesian_linear_x_big_scale_func (gdouble value,
                                       gpointer data);

ags_cartesian_linear_y_small_scale_func ()

gdouble
ags_cartesian_linear_y_small_scale_func
                               (gdouble value,
                                gpointer data);

ags_cartesian_linear_y_big_scale_func ()

gdouble
ags_cartesian_linear_y_big_scale_func (gdouble value,
                                       gpointer data);

ags_cartesian_linear_x_label_func ()

gchar *
ags_cartesian_linear_x_label_func (gdouble value,
                                   gpointer data);

ags_cartesian_linear_y_label_func ()

gchar *
ags_cartesian_linear_y_label_func (gdouble value,
                                   gpointer data);

ags_cartesian_reallocate_label ()

void
ags_cartesian_reallocate_label (AgsCartesian *cartesian,
                                gboolean do_x_label);

ags_cartesian_fill_label ()

void
ags_cartesian_fill_label (AgsCartesian *cartesian,
                          gboolean do_x_label);

ags_cartesian_new ()

AgsCartesian *
ags_cartesian_new ();

Create a new instance of AgsCartesian

Returns

the new AgsCartesian

Since: 2.0.0


AGS_CARTESIAN()

#define AGS_CARTESIAN(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CARTESIAN, AgsCartesian))

AGS_CARTESIAN_CLASS()

#define AGS_CARTESIAN_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CARTESIAN, AgsCartesianClass))

AGS_CARTESIAN_GET_CLASS()

#define AGS_CARTESIAN_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CARTESIAN, AgsCartesianClass))

AGS_IS_CARTESIAN()

#define AGS_IS_CARTESIAN(obj)             (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CARTESIAN))

ags_cartesian_get_type ()

GType
ags_cartesian_get_type (void);

Types and Values

AGS_CARTESIAN_DEFAULT_X_MARGIN

#define AGS_CARTESIAN_DEFAULT_X_MARGIN (24.0)

AGS_CARTESIAN_DEFAULT_Y_MARGIN

#define AGS_CARTESIAN_DEFAULT_Y_MARGIN (24.0)

AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH

#define AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH (10.0)

AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT

#define AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT (10.0)

AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH

#define AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH (10.0)

AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT

#define AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT (10.0)

AGS_CARTESIAN_DEFAULT_X_STEP

#define AGS_CARTESIAN_DEFAULT_X_STEP (1.0)

AGS_CARTESIAN_DEFAULT_Y_STEP

#define AGS_CARTESIAN_DEFAULT_Y_STEP (1.0)

AGS_CARTESIAN_DEFAULT_X_START

#define AGS_CARTESIAN_DEFAULT_X_START (-60.0)

AGS_CARTESIAN_DEFAULT_X_END

#define AGS_CARTESIAN_DEFAULT_X_END (199.0)

AGS_CARTESIAN_DEFAULT_Y_START

#define AGS_CARTESIAN_DEFAULT_Y_START (-70.0)

AGS_CARTESIAN_DEFAULT_Y_END

#define AGS_CARTESIAN_DEFAULT_Y_END (99.0)

AGS_CARTESIAN_DEFAULT_X_LABEL_START

#define AGS_CARTESIAN_DEFAULT_X_LABEL_START (10.0)

AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH

#define AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH (50.0)

AGS_CARTESIAN_DEFAULT_Y_LABEL_START

#define AGS_CARTESIAN_DEFAULT_Y_LABEL_START (20.0)

AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT

#define AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT (50.0)

enum AgsCartesianFlags

Members

AGS_CARTESIAN_ABSCISSAE

   

AGS_CARTESIAN_ORDINATE

   

AGS_CARTESIAN_X_SCALE

   

AGS_CARTESIAN_Y_SCALE

   

AGS_CARTESIAN_X_UNIT

   

AGS_CARTESIAN_Y_UNIT

   

AGS_CARTESIAN_X_LABEL

   

AGS_CARTESIAN_Y_LABEL

   

enum AgsPlotFillFlags

Members

AGS_PLOT_FILL_REPLACE

   

struct AgsPlot

struct AgsPlot {
  guint fill_flags;

  guint n_points;
  gboolean join_points;
  gdouble **point;
  gdouble **point_color;
  gchar **point_label;

  guint n_bitmaps;
  unsigned char **bitmap;
  gdouble **bitmap_color;

  guint n_pixmaps;
  gdouble ***pixmap;
};

AGS_TYPE_CARTESIAN

#define AGS_TYPE_CARTESIAN                (ags_cartesian_get_type())

struct AgsCartesian

struct AgsCartesian;

struct AgsCartesianClass

struct AgsCartesianClass {
  GtkWidgetClass widget;
};

Property Details

The “center” property

  “center”                   gdouble

The center of lines

Flags: Read / Write

Allowed values: >= 0

Default value: 0.5

Since: 2.0.0


The “font-size” property

  “font-size”                gdouble

The font's size to draw labels and units.

Flags: Read / Write

Allowed values: >= 0

Default value: 12

Since: 2.0.0


The “line-width” property

  “line-width”               gdouble

The line width.

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 2.0.0


The “point-radius” property

  “point-radius”             gdouble

The points radius.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 2.0.0


The “x-end” property

  “x-end”                    gdouble

The x end.

Flags: Read / Write

Default value: 199

Since: 2.0.0


The “x-label” property

  “x-label”                  gpointer

The x labels as a string array.

Flags: Read / Write

Since: 2.0.0


The “x-label-start” property

  “x-label-start”            gdouble

The x label start position.

Flags: Read / Write

Allowed values: >= 0

Default value: 10

Since: 2.0.0


The “x-label-step-width” property

  “x-label-step-width”       gdouble

The x label step width.

Flags: Read / Write

Allowed values: >= 0

Default value: 50

Since: 2.0.0


The “x-margin” property

  “x-margin”                 gdouble

The horizontal x margin.

Flags: Read / Write

Allowed values: >= 0

Default value: 24

Since: 2.0.0


The “x-scale-step-width” property

  “x-scale-step-width”       gdouble

The width of a x scale step.

Flags: Read / Write

Allowed values: >= 0

Default value: 10

Since: 2.0.0


The “x-start” property

  “x-start”                  gdouble

The x start.

Flags: Read / Write

Default value: -60

Since: 2.0.0


The “x-step” property

  “x-step”                   gdouble

The x step.

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 2.0.0


The “x-step-width” property

  “x-step-width”             gdouble

The width of a x step.

Flags: Read / Write

Allowed values: >= 0

Default value: 10

Since: 2.0.0


The “x-unit” property

  “x-unit”                   gchar *

The x unit label.

Flags: Read / Write

Default value: NULL

Since: 2.0.0


The “x-unit-x0” property

  “x-unit-x0”                gdouble

The x unit's x0 position.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 2.0.0


The “x-unit-y0” property

  “x-unit-y0”                gdouble

The x unit's y0 position.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 2.0.0


The “y-end” property

  “y-end”                    gdouble

The y end.

Flags: Read / Write

Default value: 99

Since: 2.0.0


The “y-label” property

  “y-label”                  gpointer

The y labels as a string array.

Flags: Read / Write

Since: 2.0.0


The “y-label-start” property

  “y-label-start”            gdouble

The y label start position.

Flags: Read / Write

Allowed values: >= 0

Default value: 20

Since: 2.0.0


The “y-label-step-height” property

  “y-label-step-height”      gdouble

The y label step height.

Flags: Read / Write

Allowed values: >= 0

Default value: 50

Since: 2.0.0


The “y-margin” property

  “y-margin”                 gdouble

The horizontal y margin.

Flags: Read / Write

Allowed values: >= 0

Default value: 24

Since: 2.0.0


The “y-scale-step-height” property

  “y-scale-step-height”      gdouble

The height of a y scale step.

Flags: Read / Write

Allowed values: >= 0

Default value: 10

Since: 2.0.0


The “y-start” property

  “y-start”                  gdouble

The y start.

Flags: Read / Write

Default value: -70

Since: 2.0.0


The “y-step” property

  “y-step”                   gdouble

The y step.

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 2.0.0


The “y-step-height” property

  “y-step-height”            gdouble

The height of a y step.

Flags: Read / Write

Allowed values: >= 0

Default value: 10

Since: 2.0.0


The “y-unit” property

  “y-unit”                   gchar *

The y unit label.

Flags: Read / Write

Default value: NULL

Since: 2.0.0


The “y-unit-x0” property

  “y-unit-x0”                gdouble

The y unit's x0 position.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 2.0.0


The “y-unit-y0” property

  “y-unit-y0”                gdouble

The y unit's y0 position.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 2.0.0