wire

wire — Gives methods to draw lines as OpenGl objects pairing two elements.

Synopsis

guint               visu_gl_pairs_wire_getGeneralWidth  ();
ToolShade *         visu_gl_pairs_wire_getShade         (VisuPairLink *data);
VisuPairExtension * visu_gl_pairs_wire_getStatic        ();
guint16             visu_gl_pairs_wire_getStipple       (VisuPairLink *data);
guint               visu_gl_pairs_wire_getWidth         (VisuPairLink *data);
VisuPairExtension * visu_gl_pairs_wire_init             ();
gboolean            visu_gl_pairs_wire_setGeneralWidth  (guint val);
gboolean            visu_gl_pairs_wire_setShade         (VisuPairLink *data,
                                                         ToolShade *shade);
gboolean            visu_gl_pairs_wire_setStipple       (VisuPairLink *data,
                                                         guint16 stipple);
gboolean            visu_gl_pairs_wire_setWidth         (VisuPairLink *data,
                                                         guint val);

Description

The wire pair module is the simplest way to draw pairs between elements : using lines. The size of lines can be chosen but is limited by OpenGL implementation that usually only allow line width of 10 pixels as maximum size.

Details

visu_gl_pairs_wire_getGeneralWidth ()

guint               visu_gl_pairs_wire_getGeneralWidth  ();

Get the default width for wire pairs (see visu_gl_pairs_wire_setGeneralWidth() to set this value).

Returns :

the default width.

visu_gl_pairs_wire_getShade ()

ToolShade *         visu_gl_pairs_wire_getShade         (VisuPairLink *data);

Colour of wires can depend on length, following a ToolShade scheme.

data :

a VisuPairLink object.

Returns :

the ToolShade scheme if used, or NULL. [transfer none]

Since 3.6


visu_gl_pairs_wire_getStatic ()

VisuPairExtension * visu_gl_pairs_wire_getStatic        ();

Internal function to access the VisuPairExtension wire.

Returns :

the VisuPairExtension wire. [transfer none]

Since 3.6


visu_gl_pairs_wire_getStipple ()

guint16             visu_gl_pairs_wire_getStipple       (VisuPairLink *data);

Get the line pattern of data.

data :

a VisuPairLink object.

Returns :

a line pattern (default is 65535).

visu_gl_pairs_wire_getWidth ()

guint               visu_gl_pairs_wire_getWidth         (VisuPairLink *data);

Get the width of the given pair data. If the given pair has no specific width, the defaul value is returned.

data :

a VisuPairLink object.

Returns :

the width of the given pair.

visu_gl_pairs_wire_init ()

VisuPairExtension * visu_gl_pairs_wire_init             ();

This method is used by V_Sim on startup, don't use it on your own.

Returns :

the wire pair extension.

visu_gl_pairs_wire_setGeneralWidth ()

gboolean            visu_gl_pairs_wire_setGeneralWidth  (guint val);

The width of line between elements can be chosen by kinds of pairs, but can use a default value for all kinds of pairs when no individual value is available. Use this method to set the default width.

val :

a positive integer.

Returns :

TRUE if the value is different from previous.

visu_gl_pairs_wire_setShade ()

gboolean            visu_gl_pairs_wire_setShade         (VisuPairLink *data,
                                                         ToolShade *shade);

If shade is not NULL, make the colour of each pair varies with its length according to shade colour scheme.

data :

a VisuPairLink object.

shade :

a ToolShade object (can be NULL). [allow-none]

Returns :

TRUE if shade is changed.

Since 3.6


visu_gl_pairs_wire_setStipple ()

gboolean            visu_gl_pairs_wire_setStipple       (VisuPairLink *data,
                                                         guint16 stipple);

Change the line pattern of data.

data :

a VisuPairLink object ;

stipple :

a pattern.

Returns :

TRUE if the value is different from previous.

visu_gl_pairs_wire_setWidth ()

gboolean            visu_gl_pairs_wire_setWidth         (VisuPairLink *data,
                                                         guint val);

This method allows to change the width of line for a specific pair. When a pair is rendered via with a line, it first checks if that pairs has a specific width value set by this method. If not, it uses the default value.

data :

a VisuPairLink object ;

val :

a positive integer.

Returns :

TRUE if the value is different from previous.