VisuGlExtFrame

VisuGlExtFrame — Draw a frame with the representation of a color frame.

Synopsis

struct              VisuGlExtFrame;
struct              VisuGlExtFrameClass;
void                visu_gl_ext_frame_draw              (VisuGlExtFrame *frame);
void                visu_gl_ext_frame_getPosition       (VisuGlExtFrame *frame,
                                                         float *xpos,
                                                         float *ypos);
float               visu_gl_ext_frame_getScale          (VisuGlExtFrame *frame);
gboolean            visu_gl_ext_frame_setBgRGBA         (VisuGlExtFrame *frame,
                                                         float rgba[4],
                                                         int mask);
gboolean            visu_gl_ext_frame_setFontRGB        (VisuGlExtFrame *frame,
                                                         float rgb[3],
                                                         int mask);
gboolean            visu_gl_ext_frame_setGlView         (VisuGlExtFrame *frame,
                                                         VisuGlView *view);
gboolean            visu_gl_ext_frame_setPosition       (VisuGlExtFrame *frame,
                                                         float xpos,
                                                         float ypos);
gboolean            visu_gl_ext_frame_setRequisition    (VisuGlExtFrame *frame,
                                                         guint width,
                                                         guint height);
gboolean            visu_gl_ext_frame_setScale          (VisuGlExtFrame *frame,
                                                         float scale);
gboolean            visu_gl_ext_frame_setTitle          (VisuGlExtFrame *frame,
                                                         const gchar *title);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtFrame
               +----VisuGlExtBoxLegend
               +----VisuGlExtLegend
               +----VisuGlExtShade

Description

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

Details

struct VisuGlExtFrame

struct VisuGlExtFrame;

An opaque structure.

Since 3.7


struct VisuGlExtFrameClass

struct VisuGlExtFrameClass {
  VisuGlExtClass parent;

  void     (*draw)     (VisuGlExtFrame* frame);
};

A short way to identify _VisuGlExtFrameClass structure.

VisuGlExtClass parent;

the parent class;

draw ()

the draw method for the content of this frame.

Since 3.7


visu_gl_ext_frame_draw ()

void                visu_gl_ext_frame_draw              (VisuGlExtFrame *frame);

Render theframe and its child.

frame :

a VisuGlExtFrame object.

Since 3.7


visu_gl_ext_frame_getPosition ()

void                visu_gl_ext_frame_getPosition       (VisuGlExtFrame *frame,
                                                         float *xpos,
                                                         float *ypos);

Inquire the position of the representation of the frame.

frame :

the VisuGlExtFrame object to inquire.

xpos :

a location to store the x position. [out][allow-none]

ypos :

a location to store the y position. [out][allow-none]

Since 3.7


visu_gl_ext_frame_getScale ()

float               visu_gl_ext_frame_getScale          (VisuGlExtFrame *frame);

Frames are rendered with a scaling factor of 1. by default.

frame :

a VisuGlExtFrame object.

Returns :

the scaling factor used to represent frames.

Since 3.7


visu_gl_ext_frame_setBgRGBA ()

gboolean            visu_gl_ext_frame_setBgRGBA         (VisuGlExtFrame *frame,
                                                         float rgba[4],
                                                         int mask);

Change the colour to represent the background of the frame.

frame :

the VisuGlExtFrame to update.

rgba :

a four floats array with values (0 <= values <= 1) for the red, the green, the blue color and the alpha channel. Only values specified by the mask are really relevant. [array fixed-size=4]

mask :

use TOOL_COLOR_MASK_R, TOOL_COLOR_MASK_G, TOOL_COLOR_MASK_B, TOOL_COLOR_MASK_A or a combinaison to indicate what values in the rgba array must be taken into account.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_frame_setFontRGB ()

gboolean            visu_gl_ext_frame_setFontRGB        (VisuGlExtFrame *frame,
                                                         float rgb[3],
                                                         int mask);

Change the colour to represent the font of the frame.

frame :

the VisuGlExtFrame to update.

rgb :

a four floats array with values (0 <= values <= 1) for the red, the green, the blue color. Only values specified by the mask are really relevant. [array fixed-size=3]

mask :

use TOOL_COLOR_MASK_R, TOOL_COLOR_MASK_G, TOOL_COLOR_MASK_B or a combinaison to indicate what values in the rgb array must be taken into account.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_frame_setGlView ()

gboolean            visu_gl_ext_frame_setGlView         (VisuGlExtFrame *frame,
                                                         VisuGlView *view);

Attach an VisuGlView to render to and setup the frame.

frame :

The VisuGlExtFrame to attached to.

view :

the nodes to get the population of.

Returns :

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

Since 3.7


visu_gl_ext_frame_setPosition ()

gboolean            visu_gl_ext_frame_setPosition       (VisuGlExtFrame *frame,
                                                         float xpos,
                                                         float ypos);

Change the position of the frame representation.

frame :

the VisuGlExtFrame object to modify.

xpos :

the reduced y position (1 to the left).

ypos :

the reduced y position (1 to the bottom).

Returns :

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

Since 3.7


visu_gl_ext_frame_setRequisition ()

gboolean            visu_gl_ext_frame_setRequisition    (VisuGlExtFrame *frame,
                                                         guint width,
                                                         guint height);

Set the size of the frame in pixels. Use visu_gl_ext_frame_setScale() to adjust the size if necessary.

frame :

the VisuGlExtFrame object to modify.

width :

the desired width.

height :

the desired height.

Returns :

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

Since 3.7


visu_gl_ext_frame_setScale ()

gboolean            visu_gl_ext_frame_setScale          (VisuGlExtFrame *frame,
                                                         float scale);

Change the zoom level for the rendering of the legend.

frame :

the VisuGlExtFrame to update.

scale :

a positive value.

Returns :

TRUE if visu_gl_ext_frame_draw() should be called.

Since 3.7


visu_gl_ext_frame_setTitle ()

gboolean            visu_gl_ext_frame_setTitle          (VisuGlExtFrame *frame,
                                                         const gchar *title);

Change the title of the box legend.

frame :

the VisuGlExtFrame object to modify.

title :

a title.

Returns :

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

Since 3.7