Jump to content

Recommended Posts

  • Administrators
Posted

Download:
The distributive is available by request only.

Release date:
1 June 2023


Warning 🚨

1. The architecture of advertising components were refactored, so now it supports different adv providers (not only AdMob). In case if you are using components TfgBannerAd or TfgInterstitialAd, you have to do follow steps:

  • Put on form new component TfgGoogleAdMobProvider, where you use TfgBannerAd or TfgInterstitialAd componsnts. The one instance TfgGoogleAdMobProvider can be used in all components.
  • Link TfgBannerAd and TfgInterstitialAd with provider via Provider property.

If you don't do this steps, than advertising will not be displayed in runtime.

2. There was a renaming of two types used for TfgPickerPhoto:

  • TfgPickerPhotoSource replaced by TfgPickerMediaSource
  • TfgPhotoFiles replaced by TfgMediaFiles

Please update the declarations if you use these types directly in your projects.

New

TfgRegionPicker

The new component was developed for interactive selecting rectangle region.

TfgBannerAd and TfgInterstitialAd

The ad placement components have been refactored, as a result of which different advertising providers (Google AdMob, Yandex Mobile Ads) are now supported.

Previously, the advertising platform Google AdMob was integrated directly into the components TfgBannerAd and TfgInterstitialAd. Now we have separated the advertising provider into separate components TfgGoogleAdMobProvider called the advertising provider. And the components TfgBannerAd and TfgInterstitialAd simply use information from the provider. Therefore, now to use advertising, it is necessary to use the provider of the required advertising platform and link it with the components TfgBannerAd and TfgInterstitialAd. You can use one provider per application. The provider has a one-to-many connection.

Yandex Mobile Ads

We added support for advertising in the "banner" and "full-page advertising" format from the Yandex Mobile Ads advertising platform. A new provider TfgYandexMobileAdsProvider has been developed.
Currently, the advertising components are implemented only for Android.

  • Added a new demo example: "Components" -> "TfgBannerAd" -> "Example of displaying an advertising banner (Yandex Mobile Ads)"

Setup on Android

In order to use the mobile version of Yandex, you need to add "com.yandex.android:mobileads:5.7.0" in the application settings "Project" -> "FGX Native Android Libraries".

Crop, preview and other helpers for TfgBitmap

The new unit FGX.Bitmap.Helpers was added. It expands features of TfgBitmap and adds additional transformation methods: Crop and Thumbnail.

  TfgBitmapHelper = class helper for TfgBitmap
  public
    {$REGION 'Creating new bitmaps'}
    /// Create thumbnail image, which can be used for preview. The image is fit into specified size with saving aspect ration.
    /// If the specified zize is zero, the method raises exception.
    function CreateThumbnail(const ASize: TSize): TfgBitmap;

    /// Creates new cropped image from specified region. ARegion - physical coordinates of region.
    function CreateCroppedBitmap(const ARegion: TRect): TfgBitmap;

    /// Creates new bitmap and apply specified tint color.
    function CreateTinted(const ATintColor: TAlphaColor): TfgBitmap;

    /// Creates new bitmap and rotate it on specified angle.
    function CreateRotated(const AAngle: TfgRotation): TfgBitmap;
    {$ENDREGION}

    {$REGION 'Transformation'}
    /// Crops bitmap by specified region. ARegion - physical coordinates of region.
    /// If region coordinates ARegion are bigger than bitmap bounds, then region size is cropped by bitmap bounds.
    /// If the specified zize is zero, then result bitmap became empty.
    procedure Crop(const ARegion: TRect);
    {$ENDREGION}
  end;

To use the new methods, you need to add the FGX.Bitmap.Helpers to the uses section and call new methods on the instance of TfgBitmap.

Exif

The new service for extracting Exif meta-information. To request Exif information, you need to use the class FGX.Exif.TfgExif. A typical usage example looks like this:

uses  
  FGX.Exif;
  
var 
  Properties: TfgExifProperties;
  
  if TfgExif.TryLoad(AFileName, Properties) then
  begin
    // Properties.Rotation;
  end;

Rotate gesture

The supporting of Rotation gesture was added. You should do follow for usage new gesture recognizer:

  • Include Rotate: GestureKinds = GestureKinds + TGestureKind.Rotate
  • Add TfgControl.OnRotate event handler.

Argument of TfgControl.OnRotate includes usefull values about rotation:

/// <summary>Initial coordinates of first finger (<c>Phase = TfgGesturePhase.Begin</c>).</summary>
/// <remarks>In Local coordinate system of control.</remarks>
InitialPoint1: TPointF;
/// <summary>Initial coordinates of second finger (<c>Phase = TfgGesturePhase.Begin</c>).</summary>
/// <remarks>In Local coordinate system of control.</remarks>
InitialPoint2: TPointF;
/// <summary>Current coordinates of first finger.</summary>
/// <remarks>In Local coordinate system of control.</remarks>
Point1: TPointF;
/// <summary>Current coordinates of second finger.</summary>
/// <remarks>In Local coordinate system of control.</remarks>
Point2: TPointF;
/// <summary>Current delta angle related to initial in counterclockwise (in degrees).</summary>
DeltaAngle: Single;
/// <summary>Curren gesture phase.</summary>
Phase: TfgGesturePhase;

TfgPickerVideo

Added video file picker. You can select one or more video files from the gallery (TfgPickerVideoFactory.PickVideoFromLibrary, TfgPickerVideoFactory.PickVideosFromLibrary), as well as record your own video using the system interface (TfgPickerVideoFactory.PickVideoFromCamera). 
When recording a video, it is possible to specify the maximum video duration in seconds (TfgPickerVideo.DurationLimit). 

Warning: This option is not guaranteed to work on Android, as directly depends on the camera vendor.

TfgCalendar

Added implementation for iOS.

Improvements 🙌

TfgDrawerLayout

The new property SwipeEnabled was added. It's responsible for disabling sliding drawer by interactive way. Use it instead of Enabled.

TfgCollectionView

The new property ScrollEnabled was added. It's responsible for list scrolling by interactive way.

SVG

Improved support for SVG files:

  • Added recognition of gradient point parameters via style (Attribute Style).
  • Added predictive reading of gradients and styles after using them directly.
  • Added support for using ',' as a separator in the assignment of transformation matrices.

Bug Fixes 🐛

  • Like 1
×
×
  • Create New...