
// Get the current front image
image GlobalSino := GetFrontImage()

// Create two line annotations
GlobalSino.CreateLineAnnotation(0, 0, 50, 200)    // Line 1
GlobalSino.CreateLineAnnotation(100, 50, 200, 250) // Line 2

// Get the image display
imagedisplay disp
disp = GlobalSino.ImageGetImageDisplay(0)

// Get the total number of line annotations
number nLines = disp.ComponentCountChildrenOfType(2)

// Get the last two line components (just added)
component line1 = disp.ComponentGetNthChildOfType(2, nLines - 2)
component line2 = disp.ComponentGetNthChildOfType(2, nLines - 1)

// Set their colors
line1.ComponentSetForegroundColor(1.0, 0.0, 0.0)  // Red
line2.ComponentSetForegroundColor(0.0, 0.0, 1.0)  // Blue