IELayer object allows to control the properties of a layer, as transparency, position, etc.

Namespace: HiComponents.IEvolution
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public class IELayer
Public Class IELayer
public ref class IELayer

Members

            
 All Members  Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
AlphaEdgeFeathering

If the layer has an alpha channel then edges of the image will be "feathered." Feathering softens the edges of an image by applying alpha transparency at a rate that is proportional to the distance to the edge (specifically, adding a gradient in the alpha channel).

The value (0 to 255) indicates the depth in pixels of the feather effect.

Default: 0 (no edge feathering)

Antialias
Improves the quality of layer drawing by using anti-aliasing.
AspectRatioLocked
When enabled the PreferredAspectRatio for the layer will be enforced regardless of the setting for LayersResizeAspectRatio.
BorderColor
Provides generic access to the color of the border/line of the layer.
BorderWidth
Provides generic access to the width of the border/line of the layer.
ConvertToImageLayer(Double, Boolean)

Changes the Kindtype of the current layer to IEImageLayer.

This will change it from a vector-based layer to a standard bitmap layer. Bitmap layers can be edited using standard image modification features, but the quality will be lost if you resize the layer.

Note:

- For text layers, a qualityFactor of 1 usually works best

- To convert multiple layers, use IEImage.LayersConvertToImageLayers

CopyFrom(IELayer)
Replace current layer with a copy of the source layer.
Cropped

If true and the layer is out of background image (layer 0) area, this layer will be cut to the background.

DrawOuter
If True draws unselected layers as 'grayed'. The selected layer is drawn normally.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
FillColor
Provides generic access to the fill color of the layer. Set to ARGB of (0, 0, 0, 0) for no fill (i.e. transparent background)
FillColor2

Provides generic access to the secondary gradient fill color of the layer.

If FillColor2 is different from FillColor it is drawn as a gradient (and not set to ARGB of (0, 0, 0, 0)).

The direction of the gradient is specified by FillGradient.

FillGradient
Provides generic access to the gradient fill direction for the layer.
FillOpacity

Set the opacity of the layer fill.

This value is a percentage of the layer's opacity. I.e. if FillOpacity is 0.5, and Opacity is 0.5, then the fill's actual opacity will be 0.25.

Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetIndex()()()()
Returns the index of this layer inside the Layers list.
GetLayerMask()()()()
Returns the layer mask associated with this layer.
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
GroupIndex

Specifies the Group ID of the layer. When a layer is selected all other layers with the same group ID are automatically selected too.

GroupIndex can be any value. A GroupIndex of 0 means the layer is not grouped.

Note: GroupIndex is only valid if multiple layer selection is enabled.

handle
Height
Specifies the layer size (i.e. display height when zoom is 100%).
IsMask

If True this is a layer mask.

A layer mask contains a gray scale image (ie8g) which is connected to the upper layer.

The layer mask specifies where the upper layer is visible (255=fully visible).

A layer mask should be invisible (Visible=False).

Kind
Kind of layer
Locked

If False user can move or resize the layer. Also this enables to show the layer border and resizing grips.

MagnifyEnabled

If true this is a magnify layer.

The bitmap of the layer is filled with the background zoomed according to MagnifyRate property.

This property doesn’t apply to layer 0.

MagnifyRate

Specify the rate of the magnify layer (magnification).

Allowed values greather than 1.

Valid only if MagnifyEnabled=True.

This property doesn’t apply to layer 0.

MagnifySource

Specifies the magnify layer source.

It can be IEMagnifySource.BackgroundLayer to get data from the background layer and IEMagnifySource.Canvas to get data from the painted background. If you want the magnify the layer 0 image, getting pixels directly from the bitmap use IEMagnifySource.BackgroundLayer.

MagnifyStyle

Specify the magnify layer shape.

It can be Rectangle or Ellipse. Valid only if MagnifyEnabled=True.

This property doesn’t apply to layer 0.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Modified
Returns true if the layer has been changed since it was created or loaded.
Name
Specifies an user assignable name.
Opacity
Set the overall opacity of the layer in the range from 0.0 (fully transparent) to 1.0 (totally opaque). Use Opacity instead of Transparency when the image has an alpha channel.
Operation
Specify the operation to execute between this layer and the background layer.
PosX
Specifies the horizontal position of the layer relative to the background image (layer 0).
PosY
Specifies the vertical position of the layer relative to the background image (layer 0).
PreferredAspectRatio()()()()

Returns the best ratio of Width/Height to display this layer.

Some layer types look best at their original aspect ratio (i.e. the ratio of Height:Width).

This is particularly true of images and some shapes.

Result is 0 if this layer type does not have a preferred aspect ratio.

Typical results:

Portrait image: 0.67

Landscape image: 1.33

Star shape: 1

Text box: 0 (i.e. no preferred ratio)

ResampleFilter
Actived only when UseResampleFilter is true this property specifies a resample filter to use instead of default one (ZoomFilter).
RestoreAspectRatio(Boolean)

Sizes the layer to restore its preferred or original aspect ratio (i.e. the ratio of Height:Width).

Some layer types look best at their original aspect ratio. This is particularly true of images and some shapes.

Calling RestoreAspectRatio will resize it (reducing its display size) to display it correctly.

Rotate

Specifies the layer rotation angle in degrees.

It is not allowed Rotation and Resize in the same time.

To allow resize after a layer rotation, it must be maked effective, actually rotate the bitmap.

Viceversa to allow rotation after a resize, the resizing must be effective, actually resizing the bitmap.

To make effective layer rotation call IEImage.LayersFixRotations.

To make effective layer resizing call IEImage.LayersFixSizes.

Finally, multiple rotations can cause the bitmap add external, transparent, border. To remove this border call IEImage.LayersFixBorders.

When rotations are handled by IEViewer (setting EnableRotateLayers), you don't need to call LayersFixRotations, LayersFixSizes and LayersFixBorders.

RotateCenterX

Specifies the horizontal rotation center, in percentage of layer size.

0.5 means center (default), while 0 is left side and 1 is right side.

Also allowed values out of 0..1 range.

This value (and RotateCenterY) is modified when user moves the central grip, when layers rotation is active.

RotateCenterY

Specifies the vertical rotation center, in percentage of layer size.

0.5 means center (default), while 0 is top side and 1 is bottom side.

Also allowed values out of 0..1 range.

This value (and RotateCenterX) is modified when user moves the central grip, when layers rotation is active.

Selectable
Allows the layer to be selectable (the default).
Selected
True if the layer is currently selected.
Shadow

Enables and sets the properties of the layer shadow.

Note: Shadows cannot be enabled for the background layer (layer 0).

Swap(IELayer)

Swaps the content of two layers.

Note: Both layers must be of the same Kind type

Tag
An integer value that you can use for your own purposes.
ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
Transparency
Allows to set the overall transparency of the layer (255=opaque….0=transparent)
UseResampleFilter
This property actives the value specified in ResampleFilter.
Visible
Set to True to make the layer visible, otherwise set to False to hide it.
VisibleBox
If True, a box around the layer will be displayed.
Width
Specifies the layer size (i.e. display width when zoom is 100%).
XBitmapToClient(Int32)
Converts a bitmap coordinate to window coordinate (applying Zoom and position/size of the layer).
XClientToBitmap(Int32)
Converts a window coordinate to the bitmap coordinate (applying Zoom and position/size of the layer).
YBitmapToClient(Int32)
Converts a bitmap coordinate to window coordinate (applying Zoom and position/size of the layer).
YClientToBitmap(Int32)
Converts a window coordinate to the bitmap coordinate (applying Zoom and position/size of the layer).

Inheritance Hierarchy

See Also