Reference for the Mosaic class Views::FilterScreen

Views::FilterScreen
AlphaBlended
BlurClampToEdges
BlurRadius
Embedded
Margin
MarginBottom
MarginLeft
MarginRight
MarginTop
MaskBeforeBlur
MaskBitmap
MaskInverted
MaskOrigin
Opacity
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 Screen view to perform visual filter operations on the display content.

The class Views::FilterScreen provides a kind of view specialized to perform visual filter operations on the screen contents lying behind this view's area. For this purpose the view renders this area to an off-screen image and uses this image as source for the filter operations. This view implements following three filters, which can be used individually or combined together to achieve more sophisticated effects:

Please note, the view performs the filter operations on the screen area lying behind the view but still enclosed within the exposed area of the view. The exposed area can be smaller than the area of the view if the view has been moved beyond the borders of its owner component. In particular cases it can be reasonable to perform the filter operation of a smaller area. If this desired, the properties Margin, MarginLeft, MarginTop, MarginRight and MarginBottom can be used to configure a gap at the edges of the view.

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 the borders of the screen content lying behind the view don't appear blurred. If the property is 'false' the borders of the underlying screen content will appear blurred. See also the properties Margin, MarginLeft, MarginTop, MarginRight and MarginBottom.

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 int32 Margin = 0;

The property 'Margin' determines a gap on all four edges of the filter view to not render any of the underlying views. The corresponding source image area remains thus empty for all filter operations.

The property Margin is useful in conjunction with the blur effect (see property BlurRadius). In such case the blur can fade-out within the margin area. To achieve this effect, configure Margin with a value greater than or equal BlurRadius. See also BlurClampToEdges.

By using the properties MarginLeft, MarginTop, MarginRight and MarginBottom the margin at the four edges can be determined individually.

property int32 MarginBottom = 0;

The property 'MarginBottom' determines a gap on the bottom edge of the filter view to not render any of the underlying views. The corresponding source image area remains thus transparent for all filter operations.

The property MarginBottom is useful in conjunction with the blur effect (see property BlurRadius). In such case the blur can fade-out within the margin area. To achieve this effect, configure MarginBottom with a value greater than or equal BlurRadius. See also BlurClampToEdges.

Please note also the property Margin permitting the configuration of the margin value for all four view edges at once.

property int32 MarginLeft = 0;

The property 'MarginLeft' determines a gap on the left edge of the filter view to not render any of the underlying views. The corresponding source image area remains thus empty for all filter operations.

The property MarginLeft is useful in conjunction with the blur effect (see property BlurRadius). In such case the blur can fade-out within the margin area. To achieve this effect, configure MarginLeft with a value greater than or equal BlurRadius. See also BlurClampToEdges.

Please note also the property Margin permitting the configuration of the margin value for all four view edges at once.

property int32 MarginRight = 0;

The property 'MarginRight' determines a gap on the right edge of the filter view to not render any of the underlying views. The corresponding source image area remains thus empty for all filter operations.

The property MarginRight is useful in conjunction with the blur effect (see property BlurRadius). In such case the blur can fade-out within the margin area. To achieve this effect, configure MarginRight with a value greater than or equal BlurRadius. See also BlurClampToEdges.

Please note also the property Margin permitting the configuration of the margin value for all four view edges at once.

property int32 MarginTop = 0;

The property 'MarginTop' determines a gap on the top edge of the filter view to not render any of the underlying views. The corresponding source image area remains thus empty for all filter operations.

The property MarginTop is useful in conjunction with the blur effect (see property BlurRadius). In such case the blur can fade-out within the margin area. To achieve this effect, configure MarginTop with a value greater than or equal BlurRadius. See also BlurClampToEdges.

Please note also the property Margin permitting the configuration of the margin value for all four view edges at once.

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 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.