From RAD Studio XE3 Code Examples
This sample illustrates how to apply visual effects to images with FireMonkey.
You can find the ShaderFilters sample project at:
- Start > Programs > Embarcadero RAD Studio XE3 > Samples and then navigate to FireMonkey\ShaderFilters
- Subversion Repository for Delphi: http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE3_Update/FireMonkey/ShaderFilters/
How to Use the Sample
- Navigate to Start > Programs > Embarcadero RAD Studio XE3 > Samples and open ShaderFilters.dproj.
- Press F9 or choose Run > Run. To apply a specified effect to the image, select an item from the list of effects in the left.
New FireMonkey Image Show represents the main window of the sample. It contains the following components:
- Three TImage objects
- Three TListBox objects
- Two TSplitter objects
- Two TPanel objects
- A TAniIndicator
- Two TButton objects
- A TLabel
- A TStyleBook
- Two TLayout objects
- The first TListBox displays the main categories of effects.
- When you select a category of effects from the first TListBox, a list with several specific effects is displayed in the second TListBox.
- When you select a specific item from the list of effects, the respective effect is applied to the image.
- The second TListBox is subordinated to the first one. The second TListBox displays the effects subordinated to the category selected from the first TListBox.
- The selected effect is applied to the Source and Target images and a preview of the result is displayed on the Dest area.
- Some of the effects have additional characteristics (BlurAmount, BrushSize, and so on). When you select one of these effects, the options are displayed in the third TListBox. Use the TScrollBar to change the characteristics of the effect.
- The effects from the Transition main category have an additional button labeled as Play/Pause. Click this button to preview the picture transition.
- When you click the Benchmark button, the label next to the button displays the amount of time that passes until the effect is applied to the picture.