@nativescript-community/ui-image
Version:
Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
50 lines (49 loc) • 1.76 kB
TypeScript
export * from './image-common';
import { EventData, ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './image-common';
export declare class ImageInfo implements ImageInfoBase {
private width;
private height;
constructor(width: number, height: number);
getHeight(): number;
getWidth(): number;
}
export interface FinalEventData extends EventData {
imageInfo: ImageInfo;
ios: UIImage;
}
export declare function initialize(config?: ImagePipelineConfigSetting): void;
export declare function shutDown(): void;
export declare class ImagePipeline {
private _ios;
constructor();
isInDiskCache(uri: string): boolean;
isInBitmapMemoryCache(uri: string): boolean;
evictFromMemoryCache(uri: string): void;
evictFromDiskCache(uri: string): void;
evictFromCache(uri: string): void;
clearCaches(): void;
clearMemoryCaches(): void;
clearDiskCaches(): void;
prefetchToDiskCache(uri: string): Promise<void>;
prefetchToMemoryCache(uri: string): Promise<void>;
private prefetchToCacheType;
get ios(): SDImageCache;
}
export declare function getImagePipeline(): ImagePipeline;
export declare class Img extends ImageBase {
nativeViewProtected: SDAnimatedImageView;
isLoading: boolean;
private _imageSourceAffectsLayout;
createNativeView(): SDAnimatedImageView;
_setNativeClipToBounds(): void;
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
updateImageUri(): void;
_setNativeImage(nativeImage: UIImage, animated?: boolean): void;
private handleImageLoaded;
private onLoadProgress;
private getUIImage;
private initImage;
placeholderImage: UIImage;
startAnimating(): void;
stopAnimating(): void;
}