// Get the current front image
image GlobalSino := GetFrontImage()

// Create five line annotations
GlobalSino.CreateLineAnnotation(0, 0, 50, 200)        // Line 1
GlobalSino.CreateLineAnnotation(60, 10, 110, 210)     // Line 2
GlobalSino.CreateLineAnnotation(120, 20, 170, 220)    // Line 3
GlobalSino.CreateLineAnnotation(180, 30, 230, 230)    // Line 4
GlobalSino.CreateLineAnnotation(240, 40, 290, 240)    // Line 5

// 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 five line components (just added)
component line1 = disp.ComponentGetNthChildOfType(2, nLines - 5)
component line2 = disp.ComponentGetNthChildOfType(2, nLines - 4)
component line3 = disp.ComponentGetNthChildOfType(2, nLines - 3)
component line4 = disp.ComponentGetNthChildOfType(2, nLines - 2)
component line5 = disp.ComponentGetNthChildOfType(2, nLines - 1)

// Set their colors
line1.ComponentSetForegroundColor(1.0, 0.0, 0.0)  // Red
line2.ComponentSetForegroundColor(0.0, 1.0, 0.0)  // Green
line3.ComponentSetForegroundColor(0.0, 0.0, 1.0)  // Blue
line4.ComponentSetForegroundColor(1.0, 1.0, 0.0)  // Yellow
line5.ComponentSetForegroundColor(1.0, 0.0, 1.0)  // Magenta
