You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.7 KiB

4 months ago
import type { DisplayObject, DisplayObjectConfig, ImageStyleProps as GImageStyleProps } from '@antv/g';
import { Image as GImage } from '@antv/g';
export interface ImageStyleProps extends GImageStyleProps {
/**
* <zh/>
*
* <en/> Radius of the rounded corner
*/
radius?: number | number[];
}
export declare class Image extends GImage {
constructor(options: DisplayObjectConfig<ImageStyleProps>);
private onMounted;
private onAttrModified;
handleRadius(): void;
}
/**
* <zh/> g clipPath Image clipPath
*
* connectImage dispatchPositionChange
*
* g
*
* <en/> Since g clipPath does not support relative positions, when the position of the affected element changes, the Image needs to be notified to update the clipPath.
*
* Use connectImage to create an association between the shape and the image, and combine it with the dispatchPositionChange method to trigger the update.
*
* This is a temporary, black-box solution, and if g supports relative positions in the future, this method will be removed.
* @param target - <zh/> <en/> Target element
*/
export declare const connectImage: (target: DisplayObject) => void;
/**
* <zh/>
*
* <en/> Trigger the associated image to update its position
* @param target - <zh/> <en/> Target element
*/
export declare const dispatchPositionChange: (target: DisplayObject) => void;