Copyright © 2008-2013 MultiMedia Soft

WANALYZER_HORIZONTAL_LINE structure

Previous pageReturn to chapter overviewNext page

The WANALYZER_HORIZONTAL_LINE structure describes settings applied to a horizontal line added to the Waveform Analyzer through the GraphicItemHorizontalLineAdd. The current settings can be retrieved through the GraphicItemHorizontalLineParamsGet method and modified through the GraphicItemHorizontalLineParamsSet method.

 

 

C# definition

 

public struct WANALYZER_HORIZONTAL_LINE

{

     public Color color;

     public enumHorizontalLineChannel nChannel;

     public enumWaveformLineDashStyles nDashStyle;

     public Int16 nHeightInPix;

     public Int16 nTranspFactor;

     public Int16 nVertPosInPerc;

     public enumLineCaps nLeftCap;

     public enumLineCaps nRightCap;

     public enumLineDashCaps nDashCap;

};

 

 

Member

Description

 

 

color

Color used for rendering the line.

nChannel

Audio channel on which the horizontal line is drawn.

Supported values are the following:

Mnemonic constant

Numeric value

Meaning

HORZ_LINE_CHANNEL_ALL

0

The horizontal line is drawn on all channels

HORZ_LINE_CHANNEL_LEFT

1

The horizontal line is drawn on the left channel only

HORZ_LINE_CHANNEL_RIGHT

2

The horizontal line is drawn on the right channel only

nDashStyle

Line dash style.

Supported values are the following:

Mnemonic constant

Value

Meaning

LINE_DASH_STYLE_SOLID

0

Solid line.

LINE_DASH_STYLE_DASH

1

Dashed line.

LINE_DASH_STYLE_DOT

2

Dotted line.

LINE_DASH_STYLE_DASH_DOT

3

Alternating dash-dot line line.

LINE_DASH_STYLE_DASH_DOT_DOT

4

Alternating dash-dot-dot line line.

 

On the screenshot below you can see the different types of horizontal lines with the corresponding value displayed on the buddy text:

 

nHeightInPix

Height of the line expressed in pixels.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nVertPosInPerc

Vertical position of the line expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

In case you should be willing the set the line position based upon a logarithmic scale, you could convert your value in dB to a value in percentage using the following formula:

ValueInPerc = 100 * pow (10, ValueInDB/20);

 

On the screenshot below you can see 3 horizontal lines, 2 on positive peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative peaks at -80% of the waveform amplitude.

 

nLeftCap

Type of cap for the left end of the line.

Supported values are the following:

Mnemonic constant

Value

Meaning

LINE_CAP_SQUARE

0

Specifies a square cap.

LINE_CAP_ROUND

1

Specifies a circular cap.

LINE_CAP_TRIANGLE

2

Specifies a triangular cap.

LINE_CAP_SQUARE_ANCHOR

3

Specifies that the line ends are anchored with a square.

LINE_CAP_ROUND_ANCHOR

4

Specifies that the line ends are anchored with a circle.

LINE_CAP_DIAMOND_ANCHOR

5

Specifies that the line ends are anchored with a diamond.

LINE_CAP_ARROW_ANCHOR

6

Specifies that the line ends are anchored with arrowheads.

 

On the screenshot below you can see the different types of line caps with the corresponding value displayed on the buddy text:

 

nRightCap

Type of cap for the right end of the line.

Supported values are the same as seen for the nLeftCap field above.

nDashCap

Type of dash/dot cap for the line.

Supported values are the following:

Mnemonic constant

Value

Meaning

LINE_DASH_CAP_FLAT

0

Specifies a square cap that squares off both ends of each dash.

LINE_DASH_CAP_ROUND

1

Specifies a circular cap that rounds off both ends of each dash.

LINE_DASH_CAP_TRIANGLE

2

Specifies a triangular cap that points both ends of each dash.

 

On the screenshot below you can see the different types of line dash caps with the corresponding value displayed on the buddy text: