JpegXlLayer Class
A layer of a JpegXlLayeredImage: an image of any size, at a position on the canvas, combined with the layers below it with a blend mode, and an optional name.
public sealed class JpegXlLayerRemarks
The image of the layer belongs to the JpegXlLayeredImage, which disposes it: its pixels may be edited in place. A layer may extend beyond the canvas, where it is cropped when the image is shown.
Properties
| Name | Description |
|---|---|
| BlendMode | Gets or sets how the layer is combined with the layers below it. |
| Image | Gets the pixels of the layer, owned by the layered image. |
| Name | Gets or sets the name of the layer, or null for a layer without name. |
| Offset | Gets or sets the position of the top-left corner of the layer on the canvas; it may be negative. |
BlendMode
JpegXlLayer.csGets or sets how the layer is combined with the layers below it.
public JpegXlBlendMode BlendMode { get; set; }Image
JpegXlLayer.csName
JpegXlLayer.csGets or sets the name of the layer, or null for a layer without name.
public string? Name { get; set; }Property value
Exceptions
ArgumentException- The name has more than
JpegXlLayer.MaxNameLengthbytes in UTF-8, or is not valid UTF-16 text.
Remarks
An empty name is stored as no name.
Offset
JpegXlLayer.csGets or sets the position of the top-left corner of the layer on the canvas; it may be negative.
public Point Offset { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- A coordinate is below
JpegXlLayer.MinOffsetor aboveJpegXlLayer.MaxOffset.
Constants
| Name | Description |
|---|---|
| MaxNameLength | The largest length of a name, in UTF-8 bytes. |
| MaxOffset | The largest offset of a layer, on each axis. |
| MinOffset | The smallest offset of a layer, on each axis. |
MaxNameLength
The largest length of a name, in UTF-8 bytes.
public const int MaxNameLength = 1071MaxOffset
The largest offset of a layer, on each axis.
public const int MaxOffset = 536870911MinOffset
The smallest offset of a layer, on each axis.
public const int MinOffset = -536870912