AnnPointOptions example for Delphi
Procedure TForm1.ExampleAnnPointOptions ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
begin
nObjectType:= LEADAnn1.AnnGetType ( hObject );
if( nObjectType <> ANNOBJECT_POINT ) then
begin
ShowMessage('This object is not an Point Option') ;
end;
LEADAnn1.AnnPointOptions.Flags:= ANNPOINT_ALL;
LEADAnn1.AnnGetPointOptions (hObject);
if (LEADAnn1.AnnPointOptions.PointBitmap = 0) then
begin
ShowMessage('There is no raster associated');
Exit;
end;
if(LEADAnn1.AnnPointOptions.PointUseBitmap = True) then
begin
LEADAnn1.AnnPointOptions.PointUseBitmap:= False;
LEADAnn1.AnnPointOptions.PointFixedSize:= False;
LEADAnn1.AnnPointOptions.PointTransparentFill:= False;
LEADAnn1.AnnPointOptions.PointBorderColor:= RGB(0, 0, 0);
LEADAnn1.AnnPointOptions.PointFillColor:= RGB(255, 255, 0);
LEADAnn1.AnnPointOptions.PointRadius:= 12;
LEADAnn1.AnnPointOptions.Flags:= (ANNPOINT_USE_BITMAP +
ANNPOINT_RADIUS +
ANNPOINT_BORDER_COLOR +
ANNPOINT_FILL_COLOR +
ANNPOINT_TRANSPARENT_FILL +
ANNPOINT_FIXED_SIZE);
end
else
begin
//Change Point appearance to a bitmap
LEADAnn1.AnnPointOptions.PointUseBitmap:= True;
LEADAnn1.AnnPointOptions.PointBitmapTransparent:= True;
LEADAnn1.AnnPointOptions.PointBitmapTransparentColor:= RGB(255, 255, 255);
end;
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnSetPointOptions(hObject);
end;