@compass-framework/core 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/BitmapDrawable.d.ts +3 -4
- package/@types/ColorDrawable.d.ts +1 -3
- package/@types/Drawable.d.ts +9 -9
- package/@types/LayerDrawable.d.ts +1 -3
- package/@types/PictureDrawable.d.ts +1 -2
- package/@types/RoundedCornersDrawable.d.ts +32 -24
- package/@types/View.d.ts +6 -4
- package/@types/ViewGroup.d.ts +3 -2
- package/package.json +1 -1
|
@@ -4,9 +4,8 @@ import { Canvas } from "./Canvas";
|
|
|
4
4
|
import { Context } from "./Context";
|
|
5
5
|
|
|
6
6
|
export declare abstract class BitmapDrawable extends Drawable {
|
|
7
|
-
protected constructor(
|
|
8
|
-
protected constructor(
|
|
9
|
-
protected constructor(context: Context, bitmapState: BitmapDrawable.BitmapState);
|
|
7
|
+
protected constructor(bitmap: Bitmap);
|
|
8
|
+
protected constructor(bitmapState: BitmapDrawable.BitmapState);
|
|
10
9
|
|
|
11
10
|
public draw(canvas: Canvas): void;
|
|
12
11
|
|
|
@@ -26,7 +25,7 @@ export declare namespace BitmapDrawable {
|
|
|
26
25
|
public constructor(bitmapState: BitmapState);
|
|
27
26
|
public constructor(bitmap: Bitmap);
|
|
28
27
|
|
|
29
|
-
public newDrawable(
|
|
28
|
+
public newDrawable(): Drawable;
|
|
30
29
|
|
|
31
30
|
public getChangingConfigurations(): number;
|
|
32
31
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Drawable } from "./Drawable";
|
|
2
2
|
import { Canvas } from "./Canvas";
|
|
3
|
-
import { Context } from "./Context";
|
|
4
3
|
|
|
5
4
|
export declare class ColorDrawable extends Drawable {
|
|
6
|
-
public constructor(
|
|
7
|
-
public constructor(context: Context, color: number);
|
|
5
|
+
public constructor(color: number);
|
|
8
6
|
|
|
9
7
|
public draw(canvas: Canvas): void;
|
|
10
8
|
|
package/@types/Drawable.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { InterfaceTemplate, Runnable } from "@compass-framework/library";
|
|
2
|
+
import { Rect } from "./Rect";
|
|
2
3
|
import { Canvas } from "./Canvas";
|
|
4
|
+
import { Configuration } from "./Configuration";
|
|
3
5
|
import { Outline } from "./Outline";
|
|
4
|
-
import { Rect } from "./Rect";
|
|
5
6
|
import { Resources } from "./Resources";
|
|
6
|
-
import { Context } from "./Context";
|
|
7
|
-
import { Configuration } from "./Configuration";
|
|
8
7
|
import { DensityMetrics } from "./DensityMetrics";
|
|
9
8
|
|
|
10
9
|
export declare abstract class Drawable {
|
|
11
|
-
protected constructor(
|
|
12
|
-
protected constructor(context: Context, drawable: Drawable);
|
|
10
|
+
protected constructor(drawable: Drawable);
|
|
13
11
|
|
|
14
12
|
public abstract draw(canvas: Canvas): void;
|
|
15
13
|
|
|
@@ -21,6 +19,8 @@ export declare abstract class Drawable {
|
|
|
21
19
|
|
|
22
20
|
public onConfigurationChanged(newConfig: Configuration): void;
|
|
23
21
|
|
|
22
|
+
public onDensityMetricsChanged(newConfig: Configuration): void;
|
|
23
|
+
|
|
24
24
|
public copyBounds() : Rect;
|
|
25
25
|
public copyBounds(bounds: Rect): void;
|
|
26
26
|
|
|
@@ -30,8 +30,6 @@ export declare abstract class Drawable {
|
|
|
30
30
|
|
|
31
31
|
public getBounds(): Rect;
|
|
32
32
|
|
|
33
|
-
public getDensityMetrics(): DensityMetrics;
|
|
34
|
-
|
|
35
33
|
public getOutline(outline:Outline):void;
|
|
36
34
|
|
|
37
35
|
public getCallback() :Drawable.Callback;
|
|
@@ -40,6 +38,8 @@ export declare abstract class Drawable {
|
|
|
40
38
|
|
|
41
39
|
public getIntrinsicHeight():number;
|
|
42
40
|
|
|
41
|
+
public getDensityMetrics(): DensityMetrics;
|
|
42
|
+
|
|
43
43
|
public setBounds(bounds: Rect): void;
|
|
44
44
|
public setBounds(left: number, top: number, right: number, bottom: number): void;
|
|
45
45
|
|
|
@@ -48,9 +48,9 @@ export declare abstract class Drawable {
|
|
|
48
48
|
|
|
49
49
|
export declare namespace Drawable {
|
|
50
50
|
export abstract class ConstantState {
|
|
51
|
-
public abstract newDrawable(
|
|
51
|
+
public abstract newDrawable(): Drawable;
|
|
52
52
|
|
|
53
|
-
public newResourcesDrawable(
|
|
53
|
+
public newResourcesDrawable(res: Resources): Drawable;
|
|
54
54
|
|
|
55
55
|
public abstract getChangingConfigurations(): number;
|
|
56
56
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {Implements, Runnable} from "@compass-framework/library";
|
|
2
2
|
import { Canvas } from "./Canvas";
|
|
3
3
|
import { Drawable } from "./Drawable";
|
|
4
|
-
import { Context } from "./Context";
|
|
5
4
|
import { Resources } from "./Resources";
|
|
6
5
|
|
|
7
6
|
@Implements(Drawable.Callback)
|
|
8
7
|
export declare class LayerDrawable extends Drawable implements Drawable.Callback {
|
|
9
|
-
public constructor(
|
|
10
|
-
public constructor(context: Context, layers: Drawable[]);
|
|
8
|
+
public constructor(layers: Drawable[]);
|
|
11
9
|
|
|
12
10
|
public addLayer(layer: Drawable): void;
|
|
13
11
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BitmapDrawable } from "./BitmapDrawable";
|
|
2
2
|
import { Picture } from "./Picture";
|
|
3
|
-
import { Context } from "./Context";
|
|
4
3
|
|
|
5
4
|
export declare class PictureDrawable extends BitmapDrawable {
|
|
6
|
-
public constructor(
|
|
5
|
+
public constructor(url: string);
|
|
7
6
|
|
|
8
7
|
public invalidate() : void;
|
|
9
8
|
|
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
import { Canvas } from "./Canvas";
|
|
2
2
|
import { Paint } from "./Paint";
|
|
3
3
|
import { Drawable } from "./Drawable";
|
|
4
|
-
import {
|
|
4
|
+
import { Resources } from "./Resources";
|
|
5
5
|
|
|
6
6
|
export declare class RoundedCornersDrawable extends Drawable {
|
|
7
|
-
public constructor(
|
|
8
|
-
public constructor(context: Context, drawable: RoundedCornersDrawable);
|
|
9
|
-
public constructor(context: Context, fillColor: number, radius: number);
|
|
10
|
-
public constructor(context: Context, strokeColor: number, radius: number, strokeWidth: number);
|
|
11
|
-
public constructor(context: Context, fillColor: number, strokeColor: number, radius: number, strokeWidth: number);
|
|
12
|
-
public constructor(context: Context, fillColor: number, lt: number, rt: number, rb: number, lb: number);
|
|
13
|
-
public constructor(context: Context, strokeColor: number, lt: number, rt: number, rb: number, lb: number, strokeWidth: number);
|
|
14
|
-
public constructor(context: Context, fillColor: number, strokeColor: number, lt: number, rt: number, rb: number, lb: number, strokeWidth: number);
|
|
7
|
+
public constructor(configuration: RoundedCornersDrawable.Configuration, resources?: Resources)
|
|
15
8
|
|
|
16
9
|
public draw(canvas: Canvas): void;
|
|
17
10
|
|
|
18
|
-
public
|
|
11
|
+
public getLeftTopRadius(): number
|
|
19
12
|
|
|
20
|
-
public
|
|
13
|
+
public getLeftBottomRadius(): number
|
|
21
14
|
|
|
22
|
-
public
|
|
15
|
+
public getRightTopRadius(): number
|
|
23
16
|
|
|
24
|
-
public
|
|
17
|
+
public getRightBottomRadius(): number
|
|
25
18
|
|
|
26
|
-
public
|
|
19
|
+
public getStyle(): Paint.Style
|
|
27
20
|
|
|
28
|
-
public
|
|
21
|
+
public getOpacity(): number
|
|
29
22
|
|
|
30
|
-
public
|
|
23
|
+
public setStyle(style: Paint.Style): void
|
|
31
24
|
|
|
32
|
-
public
|
|
25
|
+
public setStrokeWidth(strokeWidth: number): void
|
|
33
26
|
|
|
34
|
-
public
|
|
27
|
+
public setFillColor(color: number): void
|
|
35
28
|
|
|
36
|
-
public
|
|
29
|
+
public setRadius(radius: number): void
|
|
37
30
|
|
|
38
|
-
public
|
|
31
|
+
public setStrokeColor(color: number): void
|
|
39
32
|
|
|
40
|
-
public
|
|
33
|
+
public setAlpha(alpha: number): void
|
|
41
34
|
|
|
42
|
-
public
|
|
35
|
+
public setLeftBottomRadius(radius: number): void
|
|
43
36
|
|
|
44
|
-
public
|
|
37
|
+
public setLeftTopRadius(radius: number): void
|
|
45
38
|
|
|
46
|
-
public
|
|
39
|
+
public setRightTopRadius(radius: number): void
|
|
40
|
+
|
|
41
|
+
public setRightBottomRadius(radius: number): void
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace RoundedCornersDrawable {
|
|
45
|
+
export type Configuration = {
|
|
46
|
+
leftTopRadius?: number,
|
|
47
|
+
leftBottomRadius?: number,
|
|
48
|
+
rightTopRadius?: number,
|
|
49
|
+
rightBottomRadius?: number,
|
|
50
|
+
radius?: number,
|
|
51
|
+
strokeColor?: number,
|
|
52
|
+
fillColor?: number,
|
|
53
|
+
strokeWidth?: number
|
|
54
|
+
};
|
|
47
55
|
}
|
package/@types/View.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ArrayList,
|
|
3
|
-
Runnable,
|
|
4
2
|
InterfaceTemplate,
|
|
3
|
+
Runnable,
|
|
4
|
+
ArrayList,
|
|
5
5
|
} from "@compass-framework/library";
|
|
6
6
|
|
|
7
7
|
import { ViewOverlay } from "./ViewOverlay";
|
|
@@ -93,14 +93,16 @@ export declare class View implements Drawable.Callback {
|
|
|
93
93
|
|
|
94
94
|
public startAnimation(animation:Animation) : void;
|
|
95
95
|
|
|
96
|
-
public onDraw(canvas: Canvas): void;
|
|
97
|
-
|
|
98
96
|
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
99
97
|
|
|
98
|
+
public onDraw(canvas: Canvas): void;
|
|
99
|
+
|
|
100
100
|
public onLayout(changed: boolean, left: number, top: number, right: number, bottom: number): void;
|
|
101
101
|
|
|
102
102
|
public onConfigurationChanged(newConfig: Configuration): void;
|
|
103
103
|
|
|
104
|
+
public onDensityMetricsChanged(newConfig: Configuration): void;
|
|
105
|
+
|
|
104
106
|
public getAlpha(): number;
|
|
105
107
|
|
|
106
108
|
public getWidth(): number;
|
package/@types/ViewGroup.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Implements } from "@compass-framework/library";
|
|
2
2
|
import { View } from "./View";
|
|
3
3
|
import { AttributeSet } from "./AttributeSet";
|
|
4
|
-
import { Context } from "./Context";
|
|
5
4
|
import { Configuration } from "./Configuration";
|
|
6
5
|
import { ViewParent } from "./ViewParent";
|
|
7
6
|
import { MotionEvent } from "./MotionEvent";
|
|
@@ -61,10 +60,12 @@ export declare namespace ViewGroup {
|
|
|
61
60
|
public static MATCH_PARENT: number;
|
|
62
61
|
public static WRAP_CONTENT: number;
|
|
63
62
|
|
|
64
|
-
public constructor(
|
|
63
|
+
public constructor(width: number, height: number);
|
|
65
64
|
|
|
66
65
|
public onConfigurationChanged(newConfig: Configuration): void;
|
|
67
66
|
|
|
67
|
+
public onDensityMetricsChanged(newConfig: Configuration): void;
|
|
68
|
+
|
|
68
69
|
public getDensityMetrics(): DensityMetrics;
|
|
69
70
|
|
|
70
71
|
public getWidth(): number;
|