Skip to content

KgpImageStretch

Namespace: Hex1b

Assembly: Hex1b.dll

Describes how a KGP image is scaled to fill its allocated display area.

csharp
public enum KgpImageStretch

Fields

Fill

The image is scaled to completely fill the allocated display area while preserving the aspect ratio. Excess portions of the source image are cropped using KGP source-rectangle clipping.

Returns: KgpImageStretch

csharp
Fill = 2

Fit

The image is scaled to fit within the allocated display area while preserving the aspect ratio, maximizing one dimension. The resulting size may be smaller than the available space in one dimension. Wrap in to control positioning.

Returns: KgpImageStretch

csharp
Fit = 1

None

The image is displayed at its natural pixel-to-cell dimensions (~10 px/column, ~20 px/row). If the image is larger than the allocated area it will be clipped.

Returns: KgpImageStretch

csharp
None = 0

Stretch

The image is stretched to fill the allocated cell dimensions. Aspect ratio is not preserved — the image may appear distorted. This is the default, matching the behavior of SizeHint.Fill.

Returns: KgpImageStretch

csharp
Stretch = 3

Released under the MIT License.