Home > Blockchain >  Using Delphi FMX Effects on TMapView Objects
Using Delphi FMX Effects on TMapView Objects

Time:10-27

Is it possible to Use Delphi FMX effects like TGlowEffect on TMapview objects (TMapCircle).

FMX effects supposed to work with visible objects, if TMapView objects are derived from the Object Class, it should work I believe ?

CodePudding user response:

I'm afraid you are out of luck on this.

First of all TMapView is a wrapper for Map API that is available on iOS and Android platforms. This means that the contents of TMapView isn't really rendered by FMX but instead underlying Map API.

I see you also assume that because TMapView objects are derived from TObject class that this should allow you to attack effects to them.

Well I'm afraid your assumption is wrong. TObject is pretty much a base class for all other classes whether they represent visual components or not. For instance TFileStream is descendant from TObject and it has nothing to do with visual appearance of your application.

I'm guessing you might have confused TObject with TFmxObject class. But then again TFmxObject still does not support attaching effects to. Your object needs to be descendet from at least TControl in order to provide functionality of using animations and effects.

The only other option would be if your class would also be inheriting (using multiple-inheritance) from IEffectContainer and ITriggerEffect interfaces which are actually providing functionality of working with Effects in the first palce.

  • Related