MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / _drawBoxShadow

Method _drawBoxShadow

packages/core/ui/core/view/index.android.ts:1673–1690  ·  view source on GitHub ↗
(boxShadows: BoxShadow[])

Source from the content-addressed store, hash-verified

1671 }
1672
1673 protected _drawBoxShadow(boxShadows: BoxShadow[]) {
1674 const nativeView = this.nativeViewProtected;
1675 const valueCount = 6;
1676 const nativeArray: number[] = Array.create('int', boxShadows.length * valueCount);
1677
1678 for (let i = 0, length = boxShadows.length; i < length; i++) {
1679 const boxShadow = boxShadows[i];
1680 const nativeIndex = i * valueCount;
1681
1682 nativeArray[nativeIndex + 0] = boxShadow.color.android;
1683 nativeArray[nativeIndex + 1] = boxShadow.spreadRadius;
1684 nativeArray[nativeIndex + 2] = boxShadow.blurRadius;
1685 nativeArray[nativeIndex + 3] = boxShadow.offsetX;
1686 nativeArray[nativeIndex + 4] = boxShadow.offsetY;
1687 nativeArray[nativeIndex + 5] = boxShadow.inset ? 1 : 0;
1688 }
1689 org.nativescript.widgets.Utils.drawBoxShadow(nativeView, nativeArray);
1690 }
1691
1692 _redrawNativeBackground(value: android.graphics.drawable.Drawable | Background): void {
1693 if (value instanceof Background) {

Calls 2

drawBoxShadowMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected