asset

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RenditionTypeImage = RenditionType(0)
	RenditionTypeData  = RenditionType(1)
	RenditionTypeColor = RenditionType(3)
)

Variables

This section is empty.

Functions

func New

func New(b bom.BomParser) *asset

func NewWithReadSeeker

func NewWithReadSeeker(r io.ReadSeeker) (*asset, error)

Types

type AssetParser

type AssetParser interface {
}

type BGRA

type BGRA struct {
	image.RGBA
}

BGRA to RGBA

func (*BGRA) At

func (p *BGRA) At(x, y int) color.Color

func (*BGRA) RGBAAt

func (p *BGRA) RGBAAt(x, y int) color.RGBA

func (*BGRA) SubImage

func (p *BGRA) SubImage(r image.Rectangle) image.Image

type CUIThemeMultisizeImageSetRendition

type CUIThemeMultisizeImageSetRendition struct {
	// uint32_t tag;					// 'SISM'
	Tag    bytess.String4
	Idiom  kCoreThemeIdiom // ?
	Scale  uint32          // ?
	Width  uint32
	Heigth uint32
	Index  uint32
}

type CUIThemePixelRendition

type CUIThemePixelRendition struct {
	// uint32_t tag;					// 'CELM'
	Tag bytess.String4
	// uint32_t version;
	Version uint32
	// uint32_t compressionType;
	CompressionType RenditionCompressionType
	// uint32_t rawDataLength;
	RawDataLength uint32
}

type CUIThemePixelRenditionV3

type CUIThemePixelRenditionV3 struct {
	Arg1       uint16
	Arg2       uint16
	Arg3       uint32
	Arg4       uint32
	Height     uint32
	RowDataLen uint16
	Arg6       uint16
}

TODO:

type CarHeader

type CarHeader struct {
	// uint32_t tag;
	Tag bytess.String4
	// uint32_t coreuiVersion;
	CoreuiVersion uint32
	// uint32_t storageVersion;
	StorageVersion uint32
	// uint32_t storageTimestamp;
	StorageTimestamp uint32
	// uint32_t renditionCount;
	RenditionCount uint32
	// char mainVersionString[128];
	MainVersionString bytess.String128
	// char versionString[256];
	VersionString bytess.String256
	// uuid_t uuid;
	UUID bytess.String16
	// uint32_t associatedChecksum;
	AssociatedChecksum uint32
	// uint32_t schemaVersion;
	SchemaVersion uint32
	// uint32_t colorSpaceID;
	ColorSpaceID uint32
	// uint32_t keySemantics;
	KeySemantics uint32
}

tag: 'CTAR'

type CarextendedMetadata

type CarextendedMetadata struct {
	// uint32_t tag;
	Tag bytess.String4
	// char thinningArguments[256];
	ThinningArguments bytess.String256
	// char deploymentPlatformVersion[256];
	DeploymentPlatformVersion bytess.String256
	// char deploymentPlatform[256];
	DeploymentPlatform bytess.String256
	// char authoringTool[256];
	AuthoringTool bytess.String256
}

tag: 'META'

type GA8

type GA8 struct {
	Pix    []uint8
	Stride int
	Rect   image.Rectangle
}

gray alpha 8 bit

func (*GA8) At

func (p *GA8) At(x, y int) color.Color

func (*GA8) Bounds

func (p *GA8) Bounds() image.Rectangle

func (*GA8) ColorModel

func (p *GA8) ColorModel() color.Model

func (*GA8) GA8At

func (p *GA8) GA8At(x, y int) color.RGBA

func (*GA8) PixOffset

func (p *GA8) PixOffset(x, y int) int

type RenditionAttribute

type RenditionAttribute struct {
	Name  uint16
	Value uint16hex
}

type RenditionAttributeType

type RenditionAttributeType uint32

func (RenditionAttributeType) String

func (t RenditionAttributeType) String() string

type RenditionAttrs

type RenditionAttrs map[RenditionAttributeType]uint16hex

type RenditionCallback

type RenditionCallback struct {
	Attrs RenditionAttrs
	Type  RenditionType
	Err   error
	Image image.Image
	Name  string
}

type RenditionCompressionType

type RenditionCompressionType uint32

As seen in _CUIConvertCompressionTypeToString

func (RenditionCompressionType) String

func (t RenditionCompressionType) String() string

type RenditionKeyFmt

type RenditionKeyFmt struct {
	// uint32_t tag;
	Tag bytess.String4
	// uint32_t version;
	Version uint32
	// uint32_t maximumRenditionKeyTokenCount;
	MaximumRenditionKeyTokenCount uint32
	// uint32_t renditionKeyTokens[];
	RenditionKeyTokens []RenditionAttributeType
}

tag: 'kfmt'

func (*RenditionKeyFmt) Keys

func (r *RenditionKeyFmt) Keys() []string

type RenditionLayoutType

type RenditionLayoutType uint16

type RenditionTLVType

type RenditionTLVType uint32

func (RenditionTLVType) String

func (r RenditionTLVType) String() string

type RenditionType

type RenditionType int

type Renditionkeytoken

type Renditionkeytoken struct {
	CursorHotSpot struct {
		X uint16
		Y uint16
	}
	NumberOfAttributes uint16
	Attributes         []RenditionAttribute
}

tag: 'FACETKEYS'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL