nativescript-gradient icon indicating copy to clipboard operation
nativescript-gradient copied to clipboard

add the degree

Open Hesamp opened this issue 7 years ago • 3 comments

Hello Please, in addition to the current directions, provide the possibility of rotating with degrees

Hesamp avatar Aug 26 '17 07:08 Hesamp

Can you give a code example of how you would use that, and perhaps an image of the result that would give?

EddyVerbruggen avatar Aug 26 '17 07:08 EddyVerbruggen

A good example to get gradients with degrees http://www.colorzilla.com/gradient-editor/

/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#6db3f2+0,54a3ee+50,3690f0+51,1e69de+100;Blue+Gloss+%233 */ background: #6db3f2; /* Old browsers */ background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%); /* FF3.6-15 */ background: -webkit-linear-gradient(top, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* Chrome10-25,Safari5.1-6 */ background: linear-gradient(to bottom, #6db3f2 0%,#54a3ee 50%,#3690f0 51%,#1e69de 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', endColorstr='#1e69de',GradientType=0 ); /* IE6-9 */

lawrencetaur avatar Oct 02 '17 18:10 lawrencetaur

An ideal syntax to specify the angle would be like the css's linear-gradient, so instead of:

<Gradient 
    direction="to bottom" 
    colors="#1DA1F2, #1670a7">
</Gradient>

the degree as direction:

<Gradient 
    direction="180deg" 
    colors="#1DA1F2, #1670a7">
</Gradient>

alesmit avatar Feb 12 '18 16:02 alesmit