• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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
16import {CommonMethod, Color, LineCapStyle, LineJoinStyle, Resource, PixelMap} from "./common";
17
18export declare class ShapeExtend<T> extends ShapeAttribute<T> {
19}
20
21interface Shape extends ShapeAttribute<Shape> {
22  (value?: PixelMap): Shape;
23}
24
25declare class ShapeAttribute<T> extends CommonMethod<T> {
26  viewPort(value: {
27    x?: number | string, y?: number | string,
28    width?: number | string, height?: number | string
29  }): T;
30
31  stroke(value: Color | number | string | Resource): T;
32
33  fill(value: Color | number | string | Resource): T;
34
35  strokeDashOffset(value: number | string): T;
36
37  strokeDashArray(value: Array<any>): T;
38
39  strokeLineCap(value: LineCapStyle): T;
40
41  strokeLineJoin(value: LineJoinStyle): T;
42
43  strokeMiterLimit(value: number | string): T;
44
45  strokeOpacity(value: number | string | Resource): T;
46
47  fillOpacity(value: number | string | Resource): T;
48
49  strokeWidth(value: number | string): T;
50
51  antiAlias(value: boolean): T;
52}
53
54export declare const ShapeInterface: Shape;
55