Jump to content
View in the app

A better way to browse. Learn more.

FGX Native

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Administrators

Download:
setup_1.18.14.0_release.eng.zip

Release date:
13 August 2025


New

TfgCanvas

Save state

The approach to managing the canvas state has been redesigned, namely the SaveState / RestoreState methods. Previously, when saving a state, you received a state object, which later had to be used for restoration in the RestoreState method. This approach turned out to be redundant, since the rendering commands are executed sequentially and the state is also managed sequentially (restoring to the previous state).

Now, when a state is saved, it is automatically saved to the canvas internal state stack. Added a new paired method RestoreState(), which retrieves the last state from the stack and restores it.

Now the template for working with the canvas state looks like this:

ACanvas.SaveState;
try
  // Painting
finally 
  ACanvas.RestoreState;
end;

Warning: Now you can't restore any state, only the last one. This is also due to the principle of how native canvas works in Android/iOS, which do not provide for such a feature.

Clip by path

Added support for cropping the display area along the specified path. The new TfgCanvas.ClipPath method allows you to add a new one to the current clipping area.

For example, drawing a red circle clipped by a central circle inscribed in the TfgPaintBox area:

procedure TFormMain.fgPaintBoxPaint(Sender: TObject; const ACanvas: TfgCanvas);
var
  CirclePath: TfgPath;
begin
  ACanvas.SaveState;
  CirclePath := TfgPath.Create(nil);
  try
    CirclePath.AddArc(fgPaintBox.LocalBounds, 0, 360)
              .ClosePath;
    ACanvas.ClipPath(CirclePath);

    ACanvas.Fill.Kind := TfgBrushKind.Solid;
    ACanvas.Fill.Color := TAlphaColorRec.Red;
    ACanvas.FillCircle(TPointF.Create(0, fgPaintBox.Height / 2), fgPaintBox.Height / 2);
  finally
    CirclePath.Free;
  end;
  ACanvas.RestoreState;
end;

The clipping area is restored only by restoring the state of the SaveState / RestoreState canvas.

Warning: This functionality is not supported in the designer.

Fill path rule

Added the ability to control the way paths are filled Canvas.FillPathRule.

Warning: This functionality is not supported in the designer.

Custom stroke dash

Added the ability to use a custom stroke template in the TfgBrushStroke brush. The user stroke is set using the method:

procedure SetCustomDash(const ADash: TDashArray; const AOffset: Single); 

TfgSvgPath

The new property FillRule (NonZero, EvenOdd) was added.

Form designer

The new designer was added for gradient brush.

New service IFGXApplicationMetaDataService

Added a new service for getting application metadata. To read the value of a variable named test_value you can use the code

var value: string;
value := Application.MetaData.Values['test_value'];

For iOS metadata is stored in the info.plist file, for Android in the AndroidManifest.xml manifest in the meta-data tags.

Yandex Maps Tile Provider

A new Yandex Maps tile provider TfgYandexMapTileProvider has been added for TfgMap. The tile provider supports appearance customization within the API.
To use, you need to get a free API key. Details at link.

Drag & Drop

For all controls (except for some composite controls like TfgDrawerLayout, TfgBottomSheetLayout, etc.), the ability to drag onto other controls using Long Tap has been added. The DragEnabled property is responsible for the ability to drag. To find out whether a control is currently in the dragging state, refer to the IsDragged property. Also, during the dragging process, the control fires the OnDragStarted (at the beginning) and OnDragFinished (at the end of dragging) events.

The AcceptDropMode property has been added to be able to accept draggable controls. By default, accepting draggable controls is prohibited (TfgAcceptDropMode.Restricted). However, you can allow acceptance of all controls (TfgAcceptDropMode.AcceptAll), or control acceptance at runtime using the OnCanAcceptDrop event (TfgAcceptDropMode.AcceptByEvent mode).

The main event OnDragDrop notifies about dropping the dragged control on the receiving control. OnDragEntered - the dragged control has appeared above the receiving control, OnDragExited - the dragged control has left the receiving control. The OnDragOver event occurs when the dragged control moves over the receiving control.

A typical example of handling a component drop:

procedure TFrameDrop.fgFrameDragDrop(Sender: TObject; const AData: TfgDragObject; const APoint: TPointF);
var
  LTarget: TfgControl;
  LDragged: TfgControl;
begin
  LTarget := Sender as TfgControl;
  LDragged := AData.Control as TfgControl;

  LDragged.Position.SetPointF(APoint - AData.DragPoint);
  LTarget.InsertControl(LDragged);
end;

Added new demo project "Drag and Drop" -> "Basic Example".

Improvements 🙌

SVG

The supporting followed attributes were added: stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, fill-rule.

TfgMap

The new method TfgMap.FindVisibleMarkersRegion was added for determination visible region on map, which covers all visible markers on the map. One of the ways to use the display of the visible region of all markers:

var VisibleMarkerRegion: TfgMapRect;
if fgMap1.FindVisibleMarkersRegion(VisibleMarkerRegion) then
  fgMap1.MoveCameraToVisibleRegion(VisibleMarkerRegion, 20);

An additional Animate parameter has been added to the MoveCameraToVisibleRegion method, which allows you to control the application of animation when moving the camera.

TfgControl

The new method TfgControl.LocalTo was added. It allows to convert point in local coordinate system of control to the cooridnate system of specified control ATo.

Android Api

The new type android.app.ActivityManager was added to Android.Api.ActivityAndView. Now you can find out the running processes and the memory they consume.

Miscellaneous

Now all library windows use a themed title like other IDE windows.

Bug Fixes 🐛

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.