Reference for the Mosaic class Views::FilterGroup

Views::FilterGroup
AlphaBlended
BlurClampToEdges
BlurRadius
Embedded
Group
MaskBeforeBlur
MaskBitmap
MaskInverted
MaskOrigin
Opacity
Origin
TintColor
TintIntensity
TintMode
Visible
AdjustBlurRadius()
Core::RectView
Bounds
Core::View
Layout
Owner
StackingPriority
AdjustDrawingArea()
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetClipping()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Filter Group view to perform visual filter operations on the image (the appearance) of another GUI component.

The class Views::FilterGroup provides a kind of view specialized to perform visual filter operations on an image content of the component Group. This image content will be arranged at position Origin relative to the top-left corner of the view. This view implements following three filters, which can be used individually or combined together to achieve more sophisticated effects:

The opacity of the final pixel can additionally be modulated by the property Opacity. In this way, the entire effect of the filter can be faded-in/out.

The position and the size of the view are determined by the property Bounds. The visibility of the view is controlled by the properties Visible, AlphaBlended and Embedded. In particular the property Embedded can determine whether the corresponding view is limited (== embedded) to the boundary of a sibling Core::Outline view or not. The embedding of views within a Core::Outline allows a kind of sub-groups within the GUI component itself. Very useful for any kind of scrollable lists, menus, etc.

method int32 AdjustBlurRadius
(
arg int32 aBlurRadius
);

The method AdjustBlurRadius() returns the real blur radius based on the radius provided in the parameter aBlurRadius. In practice, the Graphics Engine may support only few discrete intensity values for the blur filter. The method helps to find out which blur radius will be used effectively according to the desired blur radius value.

property bool AlphaBlended = true;

The property 'AlphaBlended' determines the drawing mode for the view. Views with disabled alpha-blending will override the affected screen areas. If this mode is enabled, the pixel of the view are combined with the origin screen content by alpha-blending.

property bool BlurClampToEdges = false;

The property 'BlurClampToEdges' controls the blur effect at the edges of the view. If the property is 'true', the blur effect ends abruptly at the edges of the view. Thereupon when the source image is aligned at the edges of the view, the borders of the source image don't appear blurred. If the property is 'false' the borders of the image will appear blurred regardless of the position of the source image within the view's area.

property int32 BlurRadius = 0;

The property 'BlurRadius' determines the intensity of the blur filter effect. The value is expressed in pixel as radius to blur the corresponding source image content. This property expects values in range 0..64. With the property BlurClampToEdges the blur effect at the edges of the view is controlled.

Please note, the Graphics Engine may support only few discrete intensity values for the blur filter. To query the values use the method AdjustBlurRadius().

property bool Embedded = false;

The property 'Embedded' controls how the view should appear and behave within its superior Owner. If this property == 'true', the affected view will be embedded (limited) to the boundary of a preceding Core::Outline sibling view. This is as if the view had been embedded within this outline. Beside the appearance limitation of the outline boundary, the outline also provides more sophisticated arrangement mechanisms and the content scrolling. It is therefore useful to create scrollable menus or lists.

If this property is 'false', the view is considered as a regular view of its Owner - it doesn't belong to any outline.

property Core::Group Group = null;

The property 'Group' refers to a component whose aspect should be displayed within this filter view. In this manner a filtered copy of a component can be shown on the screen. This is useful for fancy visual effects like shadows. Don't forget to activate the Buffered property of the component. Not buffered components can't be shown by this view.

The position of the image within the view's area is determined by the property Origin.

property bool MaskBeforeBlur = false;

The property 'MaskBeforeBlur' controls the order in which mask and blur operations are performed. If the filter view is configured to blur and mask the original source image contents, the order of the operations may produce different result:

property Resources::Bitmap MaskBitmap = null;

The property 'MaskBitmap' refers to a bitmap object to use as mask in this filter view. Being a mask, the associated bitmap is expected to be stored in the ALPHA8 format. During the filter operation is performed, the pixel found in the mask bitmap are used to modulate the opacity of the pixel involved in or resulting from the filter operation. The mask can thus be used to clip the source image contents by any non-rectangular shape.

The mask bitmap is arranged at the top-left corner of the view unless other position has been specified in the property MaskOrigin. If the mask bitmap is smaller than the view's area, the area outside the mask is considered as being transparent (opacity 0).

The effect of the mask can be inverted by using the property MaskInverted. If mask is used with a filter configured to blur the source image content, the property MaskBeforeBlur can be used to control the blur-mask order. If no bitmap is specified in the MaskBitmap property (the value of MaskBitmap is 'null'), no mask is used during the filter operation.

Please note: the filter operation restricts the mask bitmap to contain exact one (1) frame. Multi-frame bitmaps can't be used as mask in this filter view. Furthermore, the bitmap provided in MaskBitmap property has to contain pixel stored in the ALPHA8 format. Other formats are not supported.

property bool MaskInverted = false;

The property 'MaskInverted' controls how pixel data from the bitmap specified in the property MaskBitmap are evaluated. Setting MaskInverted to the value 'true' inverts the data from the mask resulting in opaque pixel wherever the mask contains a transparent pixel and transparent pixel wherever an opaque pixel is found in the mask bitmap. Areas outside the mask bitmap are consequently considered as opaque when MaskInverted is set 'true'.

property point MaskOrigin = <0,0>;

The property 'MaskOrigin' determines the position relative to the top-left corner of the area occupied by the filter view (property Bounds) where to arrange the mask bitmap MaskBitmap.

property int32 Opacity = 255;

The property 'Opacity' controls the opacity of the entire view. It modulates the opacity of the pixel data resulting from the filter operation. This property can take values in range of 0 .. 255. If the value is 255, the view will appear with its full opacity. The value equal to zero results in a fully transparent view. Other values in the range 1 .. 254 show a semitransparent view.

property point Origin = <0,0>;

The property 'Origin' determines the position relative to the top-left corner of the area occupied by the filter view (property Bounds) where to arrange the image of the component specified in the property Group.

property color TintColor = #FFFFFFFF;

The property 'TintColor' determines a color value to use when the property TintMode is configured with the option 'TintByOpacity' or 'TintByLuminance'.

property float TintIntensity = 1.0;

The property 'TintIntensity' determines the intensity of the filter effect configured in the property TintMode. This property can take values in range of 0.0 .. 1.0. If the value is 1.0, the original colors are completely replaced by values resulting from the filter effect. In turn, the value equal to zero results in the original color values without any tinting effect. For all other values the colors are interpolated between the original and the color value resulting from the filter effect.

property Graphics::TintMode TintMode = Graphics::TintMode.None;

The property 'TintMode' determines whether or not to perform a color conversion by the filter view. Following modes are available:

property bool Visible = true;

The property 'Visible' determines the visibility state of the view. Invisible views will not appear on the screen. Whether a view is really visible depends on the visibility of its Owner and the position of the view within the owners boundary area.