ImageEn, unit iexLayers

TIELayer.MaskInverted

TIELayer.MaskInverted


Declaration


property MaskInverted: Boolean;


Description


If the layer is a mask then setting MaskInverted will invert the mask (transparent area will become solid and vice versa).

Default: False


Demo


  \Demos\LayerEditing\LayerMask\LayerMask.dpr



Examples


// Create a star shape mask
ImageEnView1.LayersInsert( ImageEnView1.LayersCurrent + 1, iesStar5 );
ImageEnView1.CurrentLayer.FillColor := clBlack;
ImageEnView1.CurrentLayer.BorderWidth := 0;
ImageEnView1.CurrentLayer.IsMask := True;
ImageEnView1.CurrentLayer.MaskInverted := True;
ImageEnView1.CurrentLayer.Visible := False;

// Create an explosion with a gradient mask that radiates out
ImageEnView1.LayersInsert( ImageEnView1.LayersCurrent + 1, iesExplosion );
ImageEnView1.CurrentLayer.FillGradient := grdDiagCentered;
ImageEnView1.CurrentLayer.FillColor2 := clBlack; // 100% masking
ImageEnView1.CurrentLayer.FillColor := clWhite; // 0% masking
ImageEnView1.CurrentLayer.BorderWidth := 0;
ImageEnView1.CurrentLayer.IsMask := True;
ImageEnView1.CurrentLayer.MaskInverted := True;
ImageEnView1.CurrentLayer.Visible := False;

// Create a diamond with solid border
ImageEnView1.LayersInsert( ImageEnView1.LayersCurrent + 1, iesDiamond );
ImageEnView1.CurrentLayer.FillColor := $00808080; // 50% masking, as 128 = 80 hex)
ImageEnView1.CurrentLayer.BorderWidth := 30;
ImageEnView1.CurrentLayer.BorderColor := clBlack; // 100% masking
ImageEnView1.CurrentLayer.IsMask := True;
ImageEnView1.CurrentLayer.MaskInverted := True;
ImageEnView1.CurrentLayer.Visible := False;