Skip to content

KgpPlacement

Namespace: Hex1b

Assembly: Hex1b.dll

Represents a displayed instance of a KGP image at a specific position.

csharp
public sealed class KgpPlacement

Inheritance

ObjectKgpPlacement

Constructors

KgpPlacement(uint, uint, int, int, uint, uint, uint, uint, uint, uint, int, uint, uint)

Creates a new KGP placement anchored at the specified cell position.

Parameters:

  • imageId (UInt32): The image this placement refers to.
  • placementId (UInt32): The placement ID (0 if not specified).
  • row (Int32): Row where the placement origin is anchored.
  • column (Int32): Column where the placement origin is anchored.
  • displayColumns (UInt32): Number of columns the placement spans.
  • displayRows (UInt32): Number of rows the placement spans.
  • sourceX (UInt32): Source rectangle X offset in pixels.
  • sourceY (UInt32): Source rectangle Y offset in pixels.
  • sourceWidth (UInt32): Source rectangle width in pixels (0 = full).
  • sourceHeight (UInt32): Source rectangle height in pixels (0 = full).
  • zIndex (Int32): Z-index for stacking order.
  • cellOffsetX (UInt32): Cell X offset in pixels.
  • cellOffsetY (UInt32): Cell Y offset in pixels.
csharp
public KgpPlacement(uint imageId, uint placementId, int row, int column, uint displayColumns, uint displayRows, uint sourceX = 0, uint sourceY = 0, uint sourceWidth = 0, uint sourceHeight = 0, int zIndex = 0, uint cellOffsetX = 0, uint cellOffsetY = 0)

Properties

CellOffsetX

Cell X offset in pixels.

Returns: UInt32

csharp
public uint CellOffsetX { get; }

CellOffsetY

Cell Y offset in pixels.

Returns: UInt32

csharp
public uint CellOffsetY { get; }

Column

Column where the placement origin is anchored.

Returns: Int32

csharp
public int Column { get; }

DisplayColumns

Number of columns the placement spans.

Returns: UInt32

csharp
public uint DisplayColumns { get; }

DisplayRows

Number of rows the placement spans.

Returns: UInt32

csharp
public uint DisplayRows { get; }

ImageId

The image this placement refers to.

Returns: UInt32

csharp
public uint ImageId { get; }

PlacementId

The placement ID (0 if not specified).

Returns: UInt32

csharp
public uint PlacementId { get; }

Row

Row where the placement origin is anchored.

Returns: Int32

csharp
public int Row { get; }

SourceHeight

Source rectangle height in pixels (0=full).

Returns: UInt32

csharp
public uint SourceHeight { get; }

SourceWidth

Source rectangle width in pixels (0=full).

Returns: UInt32

csharp
public uint SourceWidth { get; }

SourceX

Source rectangle X offset in pixels.

Returns: UInt32

csharp
public uint SourceX { get; }

SourceY

Source rectangle Y offset in pixels.

Returns: UInt32

csharp
public uint SourceY { get; }

ZIndex

Z-index for stacking order.

Returns: Int32

csharp
public int ZIndex { get; }

Methods

IntersectsCell(int, int)

Whether this placement intersects the given cell position.

Parameters:

Returns: Boolean

csharp
public bool IntersectsCell(int row, int column)

IntersectsColumn(int)

Whether this placement intersects the given column.

Parameters:

Returns: Boolean

csharp
public bool IntersectsColumn(int column)

IntersectsRow(int)

Whether this placement intersects the given row.

Parameters:

Returns: Boolean

csharp
public bool IntersectsRow(int row)

Released under the MIT License.