Class TMegaImageResource
Unit
Resources
Declaration
type TMegaImageResource = class(TImageResource)
Description
Stores an extra large image which can not be handled as usual due to its size. The image is stored in a stream divided into blocks. Some number of blocks are cached in memory. Optimal block size and cache size depending on how the mega image will be used and should be determined empirically.Hierarchy
TImageResource > TResource > TItem > TBaseItemMethods
Overview
 | destructor Destroy; override; |
 | procedure AddProperties(const Result: Props.TProperties); override; |
 | function GetBlockData(ALevel, ABlockX, ABlockY: Integer): Pointer; |
 | function LoadRect(const Rect: TRect; ALevel: Integer; Dest: Pointer; DestImageWidth: Integer): Boolean; |
 | function LoadRectAsRGBA(Rect: TRect; ALevel: Integer; Dest: Pointer; DestImageWidth: Integer): Boolean; |
 | function LoadSeq(AX, AY, ALength, ALevel: Integer; Dest: Pointer): Boolean; |
 | function SaveRect(Rect: TRect; ALevel: Integer; Src: Pointer; SrcImageWidth: Integer; BuildMips: Boolean): Boolean; |
 | function SaveSeq(AX, AY, ALength, ALevel: Integer; Src: Pointer): Boolean; |
 | procedure SetDimensions(AWidth, AHeight: Integer); override; |
 | procedure SetProperties(Properties: Props.TProperties); override; |
Description
Returns address of data of the specified block. Puts the block into cache if it was not here already.
Copies a rectangular area of the specified mip level of the megaimage to an image with width DestImageWidth and data located in memory at Dest and returns True if success
Copies a rectangular area of the specified mip level of the megaimage to an RGBA image with width DestImageWidth and data located in memory at Dest and returns True if success
Copies a sequence of ALength pixels starting at (AX, AY) from the specified mip level of the megaimage to an image with width DestImageWidth and data located in memory at Dest and returns True if success
Copies a rectangular area from an image with width SrcImageWidth and data located in memory at Src to the specified mip level of the megaimage and returns True if success. Rebuilds all mipmaps lower than Level if BuildMips is True.
Copies a sequence of ALength pixels from an image with data located in memory at Src to a rectangular area on the specified mip level of the mega image starting at (AX, AY) from the specified mip level of the megaimage and returns True if success
Properties
Overview
Description
Data store stream
|
Last modified: 26 Oct, 2008
Copyright (C) 2006-2008, casteng.com
|