CshEncoder class final

Encodes immutable CSH models into Photoshop custom-shape libraries.

The configured instance is a one-shot Converter for complete in-memory files. Use encode when conversion options are supplied per call.

Inheritance

Constructors

CshEncoder({CshEncodeOptions options = const CshEncodeOptions()})
Creates a reusable encoder with fixed options.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
options → CshEncodeOptions
Options applied by convert.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<CshFile> stream) → Stream<List<int>>
Transforms the provided stream.
inherited
cast<RS, RT>() → Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(CshFile input) → Uint8List
Converts input and returns the result of the conversion.
override
fuse<TT>(Converter<List<int>, TT> other) → Converter<CshFile, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<List<int>> sink) → Sink<CshFile>
Starts a chunked conversion.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

encode(CshFile file, {CshEncodeOptions options = const CshEncodeOptions()}) → Uint8List
Encodes file into a new big-endian CSH byte buffer.