// Script function: Add a text annotation and set its colour, display mode and font.
// Requirement: Open at least one image.

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html


image GlobSinoImage:=Getfrontimage()

Component EMImageDisplay=imagegetimagedisplay(GlobSinoImage, 0)

number EMImageSizeX, EMImageSizeY
Getsize(GlobSinoImage, EMImageSizeX, EMImageSizeY)
Component GlobalSinoText=newtextannotation(EMImageSizeX-50,10, "YL", 30)
GlobalSinoText.Componentsetdrawingmode(1)
GlobalSinoText.Componentsetforegroundcolor(0,0,0)
GlobalSinoText.Componentsetbackgroundcolor(255,255,255)
EMImageDisplay.Componentaddchildatend(GlobalSinoText)


