Annotation Colors Example for Visual Basic
Dim cr As Long
RasterIO.Load Raster1, "C:\TEMP\flagsel.bmp", 0, 1, 1
RasterAnn.AnnSetBitmap hStamp, Raster1, False
RasterAnn.AnnSetAutoBackColor RasterAnn.AnnAutomation, ANN_OBJECT_ALL, RGB(40, 80, 160)
cr = RasterAnn.AnnGetAutoBackColor (RasterAnn.AnnAutomation, ANN_OBJECT_POLYGON)
MsgBox "AutoBackColor: " & Hex(cr)
If RasterAnn.AnnGetTransparent (hStamp) = False Then
RasterAnn.AnnSetTransparent hStamp, True, False
End If
RasterAnn.AnnSetTransparentColor hStamp, vbGreen, False
cr = RasterAnn.AnnGetTransparentColor (hStamp)
MsgBox "TransparentColor: " & Hex(cr)
RasterAnn.AnnSetBackColor hPlgn, vbMagenta, False
cr = RasterAnn.AnnGetBackColor (hPlgn)
MsgBox "BackColor: " & Hex(cr)
RasterAnn.AnnSetForeColor hPlgn, vbCyan, False
cr = RasterAnn.AnnGetForeColor (hPlgn)
MsgBox "ForeColor: " & Hex(cr)
RasterAnn.AnnGetBitmap hStamp, LEADRasterView1.Raster