I want to change the wavelength and amplitude of a TCurlyLine. The macro prints out the correct values of these parameters obtained from GetDefaultWaveLength and GetDefaultAmplitude. However, the wavelenght and amplitude drawn and visible using Inspect are not changed. How can I make the displayed lines show the new wavelength and amplitude?
I am using root version 5.15/08 on SLC4.
An example of the code:
void main()
{
// New Canvas
TCanvas* canvas_1 = new TCanvas("canvas_1","s-channel", 10, 10, 600, 600);
canvas_1 -> Range(0,0,100,100);
canvas_1 -> SetFillColor(0);
// Definitions
TCurlyLine* cline;
// Change Canvas
canvas_1 -> cd();
// Draw Wavy lines
cline = new TCurlyLine(25, 60, 75, 60); cline -> SetWavy(); cline -> SetDefaultWaveLength(0.04); cline -> SetDefaultAmplitude(0.03); cline -> Draw();
std::cout << "WaveLength " << cline -> GetDefaultWaveLength() << " Amplitude " << cline -> GetDefaultAmplitude() << std::endl;
cline = new TCurlyLine(25, 40, 75, 40); cline -> SetWavy(); cline -> SetDefaultWaveLength(0.08); cline -> SetDefaultAmplitude(0.06); cline -> Draw();
std::cout << "WaveLength " << cline -> GetDefaultWaveLength() << " Amplitude " << cline -> GetDefaultAmplitude() << std::endl;
// Update canvas
canvas_1 -> Update();
// Print
canvas_1 -> Print("s-channel.eps");
} //main