mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Css gradients (#5534)
* feat(ios): Added support for css gradients. * feat(android): Added support for css gradients. * fix: Fixed gradient borders on ios * fix(gradient): added backgroundGradient to View and Style. * fix(ios-gradients): fixed ios gradients covering view content. * test(gradient): Added ui app tests for background gradients. * test(gradient): Added a test ensuring background gradient property is applied to style. * style(gradient): Fixed tslint errors. * fix(gradient): Removed the background-gradient property and added the gradient to background-image. * style: fixed a consecutive blank line tslint error. * fix(tests): fixed the bug that was causing tests to fail. * chore(linear-gradient): fix equality comparer * test(gradient): add linear gradients test app * chore(tslint): update with latest tslint rules
This commit is contained in:
@ -73,6 +73,7 @@
|
||||
backgroundColor: number,
|
||||
backgroundImage: string,
|
||||
backgroundBitmap: android.graphics.Bitmap,
|
||||
backgroundGradient: LinearGradientDefinition,
|
||||
context: android.content.Context,
|
||||
backgroundRepeat: string,
|
||||
backgroundPosition: string,
|
||||
@ -117,6 +118,18 @@
|
||||
public toDebugString(): string;
|
||||
}
|
||||
|
||||
export class LinearGradientDefinition {
|
||||
constructor(startX: number, endX: number, startY: number,
|
||||
endY: number, colors: number[], stops?: number[]);
|
||||
|
||||
public getStartX(): number;
|
||||
public getStartY(): number;
|
||||
public getEndX(): number;
|
||||
public getEndY(): number;
|
||||
public getColors(): number[];
|
||||
public getStops(): number[];
|
||||
}
|
||||
|
||||
export class CSSValue {
|
||||
constructor(type: string, str: string, unit: string, value: number);
|
||||
public getType(): string;
|
||||
|
Reference in New Issue
Block a user