Copyright © 2013-2017 MultiMedia Soft

GraphicItemVertPositionSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the new vertical position of the given graphic item. The current vertical position can be obtained through the GraphicItemVertPositionGet method.

 

For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.

 

 

Syntax

 

[Visual Basic]

control.GraphicItemVertPositionSet (

nUniqueId as Integer,

nPosInPerc as Long

) as enumWanErrorCodes


 

[C++]

short control.GraphicItemVertPositionSet (

short nUniqueId,

long nPosInPerc

);


 

 

Parameter

Description

 

 

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

GraphicItemHorizontalLineAdd for horizontal lines

nPosInPerc

The new 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 lines, 2 on positive waveform peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative waveform peaks at -80% of the waveform amplitude.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumWanErrorCodes.ERR_WAN_NOERROR (0)

The method call was successful.