Set the gradient of a graphic (Solved)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Set the gradient of a graphic (Solved)

Post by EddieLee » Tue Sep 01, 2020 12:22 am

Hi all,

Is it possible to set a gradient of a graphic in livecode instead of setting it to a solid Color?

Thanks!
Last edited by EddieLee on Wed Sep 02, 2020 12:30 pm, edited 1 time in total.
Eddie :D

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Sun Feb 20, 2011 4:26 pm
Contact:

Re: Set the gradient of a graphic

Post by PBH » Tue Sep 01, 2020 1:55 am

Yes. You need to specify the properties using an array, "fillGradient" or "strokeGradient" in the Dictionary explains what each array element relates to.

A good way to understand this would be to set the fillGradient of your graphic using the property inspector and then examine the array by using a simple script in the multi-line pane of the message box.

e.g.

Code: Select all

put the fillGradient of graphic 1 into tGradA
combine tGradA by return and comma
put tGradA
Paul

Post Reply