Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

RemoveFigure

Removes a figure (geometric overlay) from the map drawer by its ID.

FigureID — the identifier returned by AddFigure when the figure was created.

Returns True if the figure was found and removed, False if no figure with the given ID exists.

Figures are visual overlays drawn on the Stealth map (lines, ellipses, rectangles, direction arrows, text labels). They are managed per-character and rendered by the map drawer.

Удаляет фигуру (геометрическое наложение) с карты по её идентификатору.

FigureID — идентификатор, возвращённый AddFigure при создании фигуры.

Возвращает True, если фигура найдена и удалена, False — если фигуры с указанным ID не существует.

Фигуры — это визуальные наложения на карте Stealth (линии, эллипсы, прямоугольники, стрелки направления, текстовые метки). Управляются per-character и отрисовываются модулем карты.

Pascal

function RemoveFigure(FigureID: Cardinal): Boolean;

Python

def RemoveFigure(FigureID: int) -> bool: ...

Pascal Example

var
  FigID: Cardinal;
  Fig: TMapFigure;
begin
  Fig.kind := fkEllipse;
  FigID := AddFigure(Fig);
  AddToSystemJournal('Added figure ID: ' + IntToStr(FigID));

  if RemoveFigure(FigID) then
    AddToSystemJournal('Figure removed')
  else
    AddToSystemJournal('Figure not found');
end.

Python Example

from py_stealth import *

fig = MapFigure()
fig.kind = FigureKind.fkEllipse
fig_id = AddFigure(fig)
AddToSystemJournal(f'Added figure ID: {fig_id}')

if RemoveFigure(fig_id):
    AddToSystemJournal('Figure removed')
else:
    AddToSystemJournal('Figure not found')

See Also

AddFigure, UpdateFigure, ClearFigures