VisuGlExtShade

VisuGlExtShade — Draw a frame with the representation of a color shade.

Synopsis

#define             VISU_GL_EXT_SHADE_ID
struct              VisuGlExtShade;
struct              VisuGlExtShadeClass;
VisuGlExtShade *    visu_gl_ext_shade_new               (const gchar *name);
gboolean            visu_gl_ext_shade_setMarks          (VisuGlExtShade *shade,
                                                         float *marks,
                                                         guint n);
gboolean            visu_gl_ext_shade_setMinMax         (VisuGlExtShade *shade,
                                                         float minV,
                                                         float maxV);
gboolean            visu_gl_ext_shade_setScaling        (VisuGlExtShade *shade,
                                                         ToolMatrixScalingFlag scaling);
gboolean            visu_gl_ext_shade_setShade          (VisuGlExtShade *ext,
                                                         ToolShade *shade);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtFrame
               +----VisuGlExtShade

Description

This extension draws a frame on top of the rendering area with a color shade. One can setup printed values and draw additional marks inside the shade.

Details

VISU_GL_EXT_SHADE_ID

#define VISU_GL_EXT_SHADE_ID "Shade"

The id used to identify this extension, see visu_gl_ext_rebuild() for instance.


struct VisuGlExtShade

struct VisuGlExtShade;

An opaque structure.

Since 3.7


struct VisuGlExtShadeClass

struct VisuGlExtShadeClass {
  VisuGlExtFrameClass parent;
};

A short way to identify _VisuGlExtShadeClass structure.

VisuGlExtFrameClass parent;

the parent class;

Since 3.7


visu_gl_ext_shade_new ()

VisuGlExtShade *    visu_gl_ext_shade_new               (const gchar *name);

Creates a new VisuGlExt to draw a shade.

name :

the name to give to the extension (default is VISU_GL_EXT_SHADE_ID). [allow-none]

Returns :

a pointer to the VisuGlExt it created or NULL otherwise.

Since 3.7


visu_gl_ext_shade_setMarks ()

gboolean            visu_gl_ext_shade_setMarks          (VisuGlExtShade *shade,
                                                         float *marks,
                                                         guint n);

The legend can draw additional marks in the shade. Setup these marks with this routine. The first and the last marks of the list will be rendered bigger than the next ones.

shade :

the VisuGlExtShade to update.

marks :

a list of float values in [0;1]. [array length=n]

n :

the length of marks.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_shade_setMinMax ()

gboolean            visu_gl_ext_shade_setMinMax         (VisuGlExtShade *shade,
                                                         float minV,
                                                         float maxV);

Change the minimum and maximum values used on the legend.

shade :

the VisuGlExtShade to update.

minV :

a value.

maxV :

another value.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_shade_setScaling ()

gboolean            visu_gl_ext_shade_setScaling        (VisuGlExtShade *shade,
                                                         ToolMatrixScalingFlag scaling);

Change the scaling variation of the shade between the minimum and the maximum values, see visu_gl_ext_shade_setMinMax().

shade :

the VisuGlExtShade to update.

scaling :

a ToolMatrixScalingFlag value.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_shade_setShade ()

gboolean            visu_gl_ext_shade_setShade          (VisuGlExtShade *ext,
                                                         ToolShade *shade);

Attach an VisuGlView to render to and setup the shade.

ext :

The VisuGlExtShade to attached to.

shade :

the shade to get the color of.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.

Since 3.7