VisuGlExtFrame

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

Functions

Properties

gfloat x-padding Read / Write
gfloat x-pos Read / Write
gfloat y-padding Read / Write
gfloat y-pos Read / Write

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── 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.

Functions

visu_gl_ext_frame_setPosition ()

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

Change the position of the frame representation.

Parameters

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 any position is actually changed.

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.

Parameters

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 value is actually changed.

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.

Parameters

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 value is actually changed.

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.

Parameters

frame

the VisuGlExtFrame to update.

 

scale

a positive value.

 

Returns

TRUE if value is actually changed.

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.

Parameters

frame

the VisuGlExtFrame object to modify.

 

title

a title.

 

Returns

TRUE if title is actually changed.

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.

Parameters

frame

the VisuGlExtFrame object to modify.

 

width

the desired width.

 

height

the desired height.

 

Returns

TRUE if requested size is changed.

Since: 3.7


visu_gl_ext_frame_setPadding ()

gboolean
visu_gl_ext_frame_setPadding (VisuGlExtFrame *frame,
                              float xpad,
                              float ypad);

Change the padding of the frame representation.

Parameters

frame

the VisuGlExtFrame object to modify.

 

xpad

the padding along x.

 

ypad

the padding along y.

 

Returns

TRUE if any position is actually changed.

Since: 3.8


visu_gl_ext_frame_getPosition ()

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

Inquire the position of the representation of the frame.

Parameters

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 (const VisuGlExtFrame *frame);

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

Parameters

frame

a VisuGlExtFrame object.

 

Returns

the scaling factor used to represent frames.

Since: 3.7

Types and Values

Property Details

The “x-padding” property

  “x-padding”                gfloat

padding along x axis.

Flags: Read / Write

Allowed values: [0,30]

Default value: 5


The “x-pos” property

  “x-pos”                    gfloat

position along x axis.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “y-padding” property

  “y-padding”                gfloat

padding along y axis.

Flags: Read / Write

Allowed values: [0,30]

Default value: 5


The “y-pos” property

  “y-pos”                    gfloat

position along y axis.

Flags: Read / Write

Allowed values: [0,1]

Default value: 1