PsPattern class final
A complete Photoshop pattern record with its source planes and metadata.
Constructors
-
PsPattern({required int version, required PsPatternColorMode colorMode, required int colorModeCode, required int vertical, required int horizontal, required String name, required String id, required Uint8List idData, required Uint8List? palette, required PsPatternIndexedMetadata? indexedMetadata, required int virtualMemoryVersion, required PsRectangle bounds, required int declaredChannelCount, required List<
PsPatternChannelSlot> slots, required Uint8List virtualMemoryTrailingData, required Uint8List recordTrailingData, required Uint8List? recordData}) - Creates an immutable Photoshop pattern record.
- PsPattern.fromRgba8({required String id, required String name, required int width, required int height, required Uint8List rgba})
-
Creates a lossless RGB pattern from straight-alpha RGBA8
rgbapixels.factory
Properties
- alphaChannel → PsPatternChannel?
-
The special sheet-transparency channel, when the final slot is present.
no setter
- bounds → PsRectangle
-
Rectangle declared by the complete virtual-memory array.
final
- canRenderRgba8 → bool
-
Whether all planes needed by renderRgba8 have decoded sample data.
no setter
-
channels
→ List<
PsPatternChannel> -
Every successfully parsed channel, in slot order.
no setter
- colorMode → PsPatternColorMode
-
Known interpretation of colorModeCode.
final
- colorModeCode → int
-
Original numeric Photoshop color-mode code.
final
- declaredChannelCount → int
-
Number of ordinary channel slots declared before the two special slots.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Tile height reported by the point field, with the VMA height as a fallback.
no setter
- horizontal → int
-
Horizontal value from the record's point field, normally the tile width.
final
- id → String
-
Pattern identifier decoded from its Pascal string.
final
- idData → Uint8List
-
Exact bytes of the identifier, including any terminal null byte.
final
- indexedMetadata → PsPatternIndexedMetadata?
-
Indexed palette footer, including standalone transparency metadata.
final
- name → String
-
Human-readable preset name without terminal null code units.
final
- palette → Uint8List?
-
Interleaved 256-entry RGB palette for indexed patterns, when present.
final
- recordData → Uint8List?
-
Complete source record bytes when preservation was requested.
final
- recordTrailingData → Uint8List
-
Bytes following the virtual-memory array inside a bounded embedded record.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ List<
PsPatternChannelSlot> -
Every ordinary, user-mask, and sheet-transparency slot in source order.
final
- userMaskChannel → PsPatternChannel?
-
The special user-mask channel, when the corresponding slot is present.
no setter
- version → int
-
Pattern format version stored in the record.
final
- vertical → int
-
Vertical value from the record's point field, normally the tile height.
final
- virtualMemoryTrailingData → Uint8List
-
Bytes following the recognized slot list inside the virtual-memory payload.
final
- virtualMemoryVersion → int
-
Virtual-memory-array format version.
final
- width → int
-
Tile width reported by the point field, with the VMA width as a fallback.
no setter
Methods
-
channelForSlot(
int index) → PsPatternChannel? -
Returns the parsed channel at
index, ornullfor an absent or malformed slot. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
renderRgba8(
{PsCmykToRgbConverter? cmykConverter, int maxPixelCount = 64 * 1024 * 1024}) → PsPatternImage - Renders the source planes into an immutable RGBA8 tile.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited