/* * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Provides interfaces for drawing components. * * @interface ShapeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Provides interfaces for drawing components. * * @interface ShapeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Provides interfaces for drawing components. * * @interface ShapeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ interface ShapeInterface { /** * Use the new function to create Shape. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Use the new function to create Shape. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ new (value?: PixelMap): ShapeAttribute; /** * Called when a component is drawn. * * @param { PixelMap } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when a component is drawn. * * @param { PixelMap } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ (value: PixelMap): ShapeAttribute; /** * Called when a component is drawn. * * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when a component is drawn. * * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when a component is drawn. * * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ (): ShapeAttribute; } /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare class ShapeAttribute extends CommonMethod { /** * Viewport of shape * * @param { object } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Viewport of shape * * @param { object } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Viewport of shape * * @param { object } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ viewPort(value: { x?: number | string; y?: number | string; width?: number | string; height?: number | string }): ShapeAttribute; /** * Called when the border color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the border color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the border color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ stroke(value: ResourceColor): ShapeAttribute; /** * Called when the fill color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the fill color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the fill color is set. * * @param { ResourceColor } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fill(value: ResourceColor): ShapeAttribute; /** * Called when the offset of the starting point of border drawing is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the offset of the starting point of border drawing is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the offset of the starting point of border drawing is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeDashOffset(value: number | string): ShapeAttribute; /** * Called when the gap of the border is set. * * @param { Array } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the gap of the border is set. * * @param { Array } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the gap of the border is set. * * @param { Array } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeDashArray(value: Array): ShapeAttribute; /** * Called when the path endpoint drawing style is set. * * @param { LineCapStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the path endpoint drawing style is set. * * @param { LineCapStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the path endpoint drawing style is set. * * @param { LineCapStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeLineCap(value: LineCapStyle): ShapeAttribute; /** * Called when the border corner drawing style is set. * * @param { LineJoinStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the border corner drawing style is set. * * @param { LineJoinStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the border corner drawing style is set. * * @param { LineJoinStyle } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeLineJoin(value: LineJoinStyle): ShapeAttribute; /** * Called when the limit value for drawing acute angles as oblique angles is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the limit value for drawing acute angles as oblique angles is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the limit value for drawing acute angles as oblique angles is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeMiterLimit(value: number | string): ShapeAttribute; /** * Called when the opacity of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the opacity of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the opacity of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeOpacity(value: number | string | Resource): ShapeAttribute; /** * Called when the transparency of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the transparency of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the transparency of the border is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fillOpacity(value: number | string | Resource): ShapeAttribute; /** * Called when the width of the border is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the width of the border is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the width of the border is set. * * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ strokeWidth(value: number | string): ShapeAttribute; /** * Called when setting whether anti aliasing is on. * * @param { boolean } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when setting whether anti aliasing is on. * * @param { boolean } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when setting whether anti aliasing is on. * * @param { boolean } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ antiAlias(value: boolean): ShapeAttribute; /** * Called when shape mesh. * * @param { Array } value * @param { number } column * @param { number } row * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when shape mesh. * * @param { Array } value * @param { number } column * @param { number } row * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when shape mesh. * * @param { Array } value * @param { number } column * @param { number } row * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ mesh(value: Array, column: number, row: number): ShapeAttribute; } /** * Defines Shape Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Shape Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines Shape Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const Shape: ShapeInterface; /** * Defines Shape Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Shape Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines Shape Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const ShapeInstance: ShapeAttribute;