1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * Provide image decoration in the text component. 18 * 19 * @interface ImageSpanInterface 20 * @syscap SystemCapability.ArkUI.ArkUI.Full 21 * @crossplatform 22 * @since 10 23 */ 24interface ImageSpanInterface { 25 /** 26 * Called when image is entered in span. 27 * 28 * @param { ResourceStr | PixelMap } value - The image resource. 29 * @returns { ImageSpanAttribute } The attribute of the image span. 30 * @syscap SystemCapability.ArkUI.ArkUI.Full 31 * @crossplatform 32 * @since 10 33 */ 34 (value: ResourceStr | PixelMap): ImageSpanAttribute; 35} 36 37/** 38 * Define the ImageSpan attribute functions. 39 * 40 * @extends CommonMethod 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @crossplatform 43 * @since 10 44 */ 45declare class ImageSpanAttribute extends CommonMethod<ImageSpanAttribute> { 46 /** 47 * Called when the alignment of image span is set. 48 * 49 * @param { ImageSpanAlignment } value - The alignment type of image span. 50 * @returns { ImageSpanAttribute } The attribute of the image span. 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @since 10 54 */ 55 verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; 56 57 /** 58 * Sets the zoom type of an image. 59 * 60 * @param { ImageFit } value - Image display mode. 61 * @returns { ImageSpanAttribute } The attribute of the image span. 62 * @syscap SystemCapability.ArkUI.ArkUI.Full 63 * @crossplatform 64 * @since 10 65 */ 66 objectFit(value: ImageFit): ImageSpanAttribute; 67} 68 69/** 70 * Defines ImageSpan Component instance. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @since 10 75 */ 76declare const ImageSpan: ImageSpanInterface; 77 78/** 79 * Defines ImageSpan Component. 80 * 81 * @syscap SystemCapability.ArkUI.ArkUI.Full 82 * @crossplatform 83 * @since 10 84 */ 85declare const ImageSpanInstance: ImageSpanAttribute; 86