Intersect Function

2018-09-24 Thread Beat Cornaz via use-livecode
Is there a function to determine the intersection point (x,y) of two lines?
The intersect function in LC only gives me a true or false, and I need the
exact location (x,y) of the intersection.

Thanks, Beat
___
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: Intersect Function

2018-09-24 Thread Beat Cornaz via use-livecode
Thanks Craig, I was already afraid of that. Yes, I guess I could figure out
the math. I will have the 2 functions of the lines and if I set them equal,
I could solve the intersection point of the two. Your way is also valid,
but as I need to determine many intersection points, the script might get
slow. Of course your way might prove better if we're looking at curves. The
amount of points in a curved line increases some in comparison to a
straight line, but in setting the functions equal, I'd have to deal with
quadratic functions. It just comes to me, that that is quite doable : move
everything to one side of the equal sign and apply the famous 'abc formula'
(at least that it was called in my high school years in Holland). It's used
to solve a quadratic equation. Once the 'x' is known, I can put it into one
of the functions to get the 'y' coordinate. I will see what goes faster.

Cheers, Beat

On Mon, Sep 24, 2018 at 3:15 PM dunbarxx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi.
>
> No.
>
> But you can determine the points of a line graphic, and calculate all the
> pixels it "contains" from its starting point to its ending point. Do the
> same for a second line.
>
> Then you can determine the point that seems to be common to both lines. I
> say seems, because when you do the math, that is, using the slope of each
> line and calculating the points using that information, you may find that
> there are no exact matches. But you can allow a small differential, and the
> closest pair of points will be the one you want.
>
> Can you do the math?
>
> Craig Newman
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> ___
> 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


Get RGB color of a specific screen location

2018-12-31 Thread Beat Cornaz via use-livecode
How do I get the RGB color of a pixel of an image? I know the function the
MouseColor, which gives me the RGB numbers under the cursor. What I need is
to get the RGB of a specific screen location - I need to make an avarage of
e.g. 5x5 pixels. So how do I get the RGB numbers of e.g. location  "30,200"?

Cheers, Beat
___
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


Get RGB color of a specific screen location

2019-01-07 Thread Beat Cornaz via use-livecode
I have asked this befor, but for the first time did not get any answer on
my post. So I hope you don't mind that I try again :-)

How do I get the RGB color of a pixel of an image? I know the function the
MouseColor, which gives me the RGB numbers under the cursor. What I need is
to get the RGB of a specific screen location - I need to make an avarage of
e.g. 5x5 pixels. So how do I get the RGB numbers of e.g. location  "30,200"?

Cheers, Beat
___
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: Get RGB color of a specific screen location

2019-01-09 Thread Beat Cornaz via use-livecode
Thanks everyone for the many suggestions. I will try them out and see which
one will work best.
Appreciate the multitude of ideas.

Cheers, Beat
___
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: Get RGB color of a specific screen location

2019-01-09 Thread Beat Cornaz via use-livecode
I have used the export snapshot and then the averaging. Works great. I had
forgotten about the export function (have been away from coding for 3
years).
I also had to implement Phil Davis' "set the screenMouseLoc to
globalLoc(tLocWithinMyStack)".
The average I got first (with only the mouseLoc) was offsetted to where I
clicked. Now it purs :-)

Thanks again, Beat
___
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


scrCopy BlendMode

2019-02-20 Thread Beat Cornaz via use-livecode
A couple of questions about BlendModes in LC.

1. The 'normal' blendMode is scrCopy (the mode all objects get when they
are created). I can change that blendmode and later put it back to scrCopy
in the Inspector. But setting the ink to scrCopy by script does not work.
I type in the messagebox :

*set the ink of img "DSC03103.jpeg" to scrCopy*

I get the following error :

*Message execution error:*

*Error description: Property: invalid enumeration value*

*Hint: *

Can anyone tell me how to set the blendMode of an image to scrCopy by
script?


2. What happened to the blendModes that do not work either, like :
BlendScr, BlendScrOver, NotSreenAnd and 15 others? Why are they available
in the choices, but do not seem to work (execution error).


3. Where can I find detailed info about the different blend modes. I'm
looking for the math on what they all do.

Kind regards,

Beat
___
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: scrCopy BlendMode

2019-02-21 Thread Beat Cornaz via use-livecode
>>1. If you quote the modes then it works.
hh wrote :
> set the ink of img "DSC03103.jpeg" to "srcCopy"

Thanks, that works.

As for info about blendmodes, hh wrote :
> https://en.wikipedia.org/wiki/Blend_modes

I had seen this site, but was wondering about the other blend modes in LC.
Including the old (Legecy ones). Where do I find a mathematical description
of how these specific LC modes work?

Thanks, Beat
___
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