Re: Set the fillGradient

2016-09-05 Thread Alejandro Tejada
Hi All,

Years ago, Scott Rossi published this stack:
http://www.tactilemedia.com/site_files/downloads/gradient_explorer.rev.zip

Does Scott Rossi still sells a Palette to
work with gradients?

By the way, there a few different ways to paste
a gradient in another graphic.

For example:
1) paste a gradient of exact size
on the location of a new graphic.

2) paste a gradient of exact size
at a new angle on the location
of a new graphic.

3) paste a gradient proportionally
on the rectangle of a new graphic.

4) paste a gradient proportionally
at a new angle on the rectangle
of a new graphic.

Creating these handlers just require
basic math and the most scarce resource
of all: Time, quality time to devote to
this task. :)

Have a nice week!

Alejandro


Randy Hengst wrote,
On Thursday, Sep 1 2016:

> To make this work via script, I’ve done two things…
> the easiest is to set the grc that I want to change
> to the size and position of the a grc master with
> the fill gradient I want to match… in this example,
> the script is in the grc to be changed:

on mouseDown
   local tStartLoc
   put the loc of target into tStartLoc
   set the loc of target to the loc of grc "Blue MasterChip"
   set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
   set the loc of target to tStartLoc
end mouseDown

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-02 Thread Randy Hengst
Glad it was helpful, Scott.

> On Sep 1, 2016, at 8:35 PM, Scott Morrow  wrote:
> 
> Ah, thanks Randy! I was familiar with this behavior but (slaps forehead) your 
> straight forward solution never occurred to me.
> 
> Scott Morrow
> 
> Elementary Software
> (Now with 20% less chalk dust!)
> web   http://elementarysoftware.com/
> email sc...@elementarysoftware.com
> office 1-800-615-0867
> --
> 
>> On Sep 1, 2016, at 5:41 AM, Randy Hengst  wrote:
>> 
>> To make this work via script, I’ve done two things… the easiest is to set 
>> the grc that I want to change to the size and position of the a grc master 
>> with the fill gradient I want to match… in this example, the script is in 
>> the grc to be changed:
>> 
>> on mouseDown
>>  local tStartLoc
>>  put the loc of target into tStartLoc
>>  set the loc of target to the loc of grc "Blue MasterChip"
>>  set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
>>  set the loc of target to tStartLoc
>> end mouseDown
>> 
>> 
>> 
>>> On Aug 31, 2016, at 9:10 PM, Roger Guay  wrote:
>>> 
>>> Yes it is.
>>> 
>>> 
 On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
 
 Is the noGradientYet graphic opaque?
 
 
 Scott Rossi
 Creative Director
 Tactile Media UX/UI Design
 
> On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
> 
> Why does this not work?
> 
> Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
> “NiceGradient”. 
> 
> Something happens . . . indeed the object browser seems to show that they 
> have the same gradient, yet they don’t!
> 
> Probably something simple, again.
> 
> LC 8.0.2 and Mac 
> 
> 
> Thanks,
> 
> Roger
> 
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Scott Morrow
Ah, thanks Randy! I was familiar with this behavior but (slaps forehead) your 
straight forward solution never occurred to me.

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web   http://elementarysoftware.com/
email sc...@elementarysoftware.com
office 1-800-615-0867
--

> On Sep 1, 2016, at 5:41 AM, Randy Hengst  wrote:
> 
> To make this work via script, I’ve done two things… the easiest is to set the 
> grc that I want to change to the size and position of the a grc master with 
> the fill gradient I want to match… in this example, the script is in the grc 
> to be changed:
> 
> on mouseDown
>   local tStartLoc
>   put the loc of target into tStartLoc
>   set the loc of target to the loc of grc "Blue MasterChip"
>   set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
>   set the loc of target to tStartLoc
> end mouseDown
> 
> 
> 
>> On Aug 31, 2016, at 9:10 PM, Roger Guay  wrote:
>> 
>> Yes it is.
>> 
>> 
>>> On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
>>> 
>>> Is the noGradientYet graphic opaque?
>>> 
>>> 
>>> Scott Rossi
>>> Creative Director
>>> Tactile Media UX/UI Design
>>> 
 On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
 
 Why does this not work?
 
 Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
 “NiceGradient”. 
 
 Something happens . . . indeed the object browser seems to show that they 
 have the same gradient, yet they don’t!
 
 Probably something simple, again.
 
 LC 8.0.2 and Mac 
 
 
 Thanks,
 
 Roger






___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Sannyasin Brahmanathaswami
p...@researchware.com> wrote:

   …  It would be a real asset (IMHO) to be able to refer to the   position of 
object in a group relative to the topLeft of the group being 0,0. 

My vote for that! Perhaps an enhancement request can be submitted?  These are 
the kind functions we really need for working the presentation layer, which is 
LC's weak area (IMHO).  CSS has this (absolute, relative positioning… If one is 
building scrolling groups where some area of the group is below the bottom of 
the card, you can of course script to placement relative to the card bottom, 
but it gets tricky, 

Being able to talk to the group child elements relative to 0,0 of the group 
would be "liberating" to say the least. My gut is also thinking… this one new 
property (s) could be be instrumental in the larger endeavor to make responsive 
programming in LC a bit more facile. (which is one main reason some think HTML5 
is better…because CSS just "does it all for you")


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Paul Dupuis
On 9/1/2016 12:00 PM, Richard Gaskin wrote:
> I don't believe we have any functions or other language elements that
> use object-local coordinates, but if we did what should those look like?

The other main area where object-local coordinates come up frequently is
with groups. It would be a real asset (IMHO) to be able to refer to the
position of object in a group relative to the topLeft of the group being
0,0. Of course, scripts/behaviors and getprop/setprop handlers can help
with this, but as with many thing, having it a true part of LiveCode -
as delivered - is often better than an add-on home grown solution.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Set the fillGradient ....

2016-09-01 Thread Richard Gaskin

Roger Guay wrote:

>
>> On Sep 1, 2016, at 5:41 AM, Randy Hengst wrote:
>>
>> To make this work via script, I’ve done two things… the easiest is
>> to set the grc that I want to change to the size and position of
>> the a grc master with the fill gradient I want to match… in this
>> example, the script is in the grc to be changed:
>>
>> on mouseDown
>>   local tStartLoc
>>   put the loc of target into tStartLoc
>>   set the loc of target to the loc of grc "Blue MasterChip"
>>   set the fillGradient of target to the fillGradient of grc "Blue 
MasterChip"

>>   set the loc of target to tStartLoc
>> end mouseDown
>
> Wow, Randy, that works! Is this a workaround to a bug or what??

At the moment it's just how it works.  Some of the elements for 
gradients use positioning, which is currently most commonly handled 
throughout LiveCode in coordinates local to the card.


This may be among the cases we come across now and then where it would 
be helpful if we had coordinates local to the object.


I don't believe we have any functions or other language elements that 
use object-local coordinates, but if we did what should those look like?


But as I think about that, even if we did have something like 
localToObjectLocal that would take at least as many lines of code to 
copy gradient data from one object to another as simply setting the loc 
and having the coords update themselves.


Hmmm

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Randy Hengst
That’s a good question, Roger… I have no idea if it’s a bug…

Glad it helped you.

> On Sep 1, 2016, at 9:06 AM, Roger Guay  wrote:
> 
> Wow, Randy, that works! Is this a workaround to a bug or what??
> 
> Thanks, Randy.
> 
> Roger
> 
> 
>> On Sep 1, 2016, at 5:41 AM, Randy Hengst  wrote:
>> 
>> To make this work via script, I’ve done two things… the easiest is to set 
>> the grc that I want to change to the size and position of the a grc master 
>> with the fill gradient I want to match… in this example, the script is in 
>> the grc to be changed:
>> 
>> on mouseDown
>>  local tStartLoc
>>  put the loc of target into tStartLoc
>>  set the loc of target to the loc of grc "Blue MasterChip"
>>  set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
>>  set the loc of target to tStartLoc
>> end mouseDown
>> 
>> 
>> 
>>> On Aug 31, 2016, at 9:10 PM, Roger Guay  wrote:
>>> 
>>> Yes it is.
>>> 
>>> 
 On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
 
 Is the noGradientYet graphic opaque?
 
 
 Scott Rossi
 Creative Director
 Tactile Media UX/UI Design
 
> On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
> 
> Why does this not work?
> 
> Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
> “NiceGradient”. 
> 
> Something happens . . . indeed the object browser seems to show that they 
> have the same gradient, yet they don’t!
> 
> Probably something simple, again.
> 
> LC 8.0.2 and Mac 
> 
> 
> Thanks,
> 
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Roger Guay
Wow, Randy, that works! Is this a workaround to a bug or what??

Thanks, Randy.

Roger


> On Sep 1, 2016, at 5:41 AM, Randy Hengst  wrote:
> 
> To make this work via script, I’ve done two things… the easiest is to set the 
> grc that I want to change to the size and position of the a grc master with 
> the fill gradient I want to match… in this example, the script is in the grc 
> to be changed:
> 
> on mouseDown
>   local tStartLoc
>   put the loc of target into tStartLoc
>   set the loc of target to the loc of grc "Blue MasterChip"
>   set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
>   set the loc of target to tStartLoc
> end mouseDown
> 
> 
> 
>> On Aug 31, 2016, at 9:10 PM, Roger Guay  wrote:
>> 
>> Yes it is.
>> 
>> 
>>> On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
>>> 
>>> Is the noGradientYet graphic opaque?
>>> 
>>> 
>>> Scott Rossi
>>> Creative Director
>>> Tactile Media UX/UI Design
>>> 
 On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
 
 Why does this not work?
 
 Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
 “NiceGradient”. 
 
 Something happens . . . indeed the object browser seems to show that they 
 have the same gradient, yet they don’t!
 
 Probably something simple, again.
 
 LC 8.0.2 and Mac 
 
 
 Thanks,
 
 Roger
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-09-01 Thread Randy Hengst
To make this work via script, I’ve done two things… the easiest is to set the 
grc that I want to change to the size and position of the a grc master with the 
fill gradient I want to match… in this example, the script is in the grc to be 
changed:

on mouseDown
   local tStartLoc
   put the loc of target into tStartLoc
   set the loc of target to the loc of grc "Blue MasterChip"
   set the fillGradient of target to the fillGradient of grc "Blue MasterChip"
   set the loc of target to tStartLoc
end mouseDown



> On Aug 31, 2016, at 9:10 PM, Roger Guay  wrote:
> 
> Yes it is.
> 
> 
>> On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
>> 
>> Is the noGradientYet graphic opaque?
>> 
>> 
>> Scott Rossi
>> Creative Director
>> Tactile Media UX/UI Design
>> 
>>> On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
>>> 
>>> Why does this not work?
>>> 
>>> Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
>>> “NiceGradient”. 
>>> 
>>> Something happens . . . indeed the object browser seems to show that they 
>>> have the same gradient, yet they don’t!
>>> 
>>> Probably something simple, again.
>>> 
>>> LC 8.0.2 and Mac 
>>> 
>>> 
>>> Thanks,
>>> 
>>> Roger
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-08-31 Thread Roger Guay
Yes it is.


> On Aug 31, 2016, at 6:49 PM, Scott Rossi  wrote:
> 
> Is the noGradientYet graphic opaque?
> 
> 
> Scott Rossi
> Creative Director
> Tactile Media UX/UI Design
> 
>> On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
>> 
>> Why does this not work?
>> 
>> Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
>> “NiceGradient”. 
>> 
>> Something happens . . . indeed the object browser seems to show that they 
>> have the same gradient, yet they don’t!
>> 
>> Probably something simple, again.
>> 
>> LC 8.0.2 and Mac 
>> 
>> 
>> Thanks,
>> 
>> Roger
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Set the fillGradient ....

2016-08-31 Thread Scott Rossi
Is the noGradientYet graphic opaque?


Scott Rossi
Creative Director
Tactile Media UX/UI Design

> On Aug 31, 2016, at 6:43 PM, Roger Guay  wrote:
> 
> Why does this not work?
> 
> Set the fillGradient of grc “noGradientYet" to the fillGradient of grc  
> “NiceGradient”. 
> 
> Something happens . . . indeed the object browser seems to show that they 
> have the same gradient, yet they don’t!
> 
> Probably something simple, again.
> 
> LC 8.0.2 and Mac 
> 
> 
> Thanks,
> 
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode