Quantcast

Goofy Drawing question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Goofy Drawing question

Mark Talluto via use-livecode
Probably very goofy, but nevertheless stumping me, so here goes:

I should like to issue this sort of command (pseudocode):

draw from 250,250 to 375, 375

and a line of the thickness and colour I have cosen would appear on the
card.

Richmond.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Goofy Drawing question

Mark Talluto via use-livecode
Assuming you wish to draw, not to paint:

local gg="goofy", fc="255,0,0", ls=3

on mouseUp
  lock screen
  if there is no grc gg then create grc gg
  set style of grc gg to "polygon" -- or "line"
  set points of grc gg to (250,250),(375, 375)
  set lineSize of grc gg to ls
  set forecolor of grc gg to fc
  unlock screen
end mouseUp

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Goofy Drawing question

Mark Talluto via use-livecode
Aah: paint, as I don't really want lots of "artifacts" lying around
after the exercise.

Richmond.

On 2/25/17 12:07 pm, hh via use-livecode wrote:

> Assuming you wish to draw, not to paint:
>
> local gg="goofy", fc="255,0,0", ls=3
>
> on mouseUp
>    lock screen
>    if there is no grc gg then create grc gg
>    set style of grc gg to "polygon" -- or "line"
>    set points of grc gg to (250,250),(375, 375)
>    set lineSize of grc gg to ls
>    set forecolor of grc gg to fc
>    unlock screen
> end mouseUp
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Goofy Drawing question

Mark Talluto via use-livecode
In reply to this post by Mark Talluto via use-livecode
On Sat, Feb 25, 2017 at 2:07 AM, hh via use-livecode <
[hidden email]> wrote:

> Assuming you wish to draw, not to paint:
>

I assumed he wanted to see it draw, so . . .

>
> local gg="goofy", fc="255,0,0", ls=3
>
> local x0=250, x1=375,y0=250, y1=275 --starting & ending coordinates
local x,y, xstep, ystep

local drwTm = 500 --time to take to draw it


on mouseUp
>   lock screen
>   if there is no grc gg then create grc gg
>
 set points of grc gg to (x0,y0)
 unlock screen

  set style of grc gg to "polygon" -- or "line"
>
 set lineSize of grc gg to ls
set forecolor of grc gg to fc

steps = max(x1-x0, y1-y0)

put (x1-x0)/steps into xstep

put (y1-y0)/steps into ystep

tinc = round(drwTm /steps)

repeat with i = 1 to steps

lock screen


  set points of grc gg to (x0,y0),(x0+i*xstep, y0+i*ystep)
>


wait tinc milliseconds with messages
unlock screen

 end repeat


>
>
> end mouseUp
>
> --
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Goofy Drawing question

Mark Talluto via use-livecode
In reply to this post by Mark Talluto via use-livecode
With a paint tool selected, use the "drag" command.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On February 25, 2017 6:18:16 AM Richmond Mathewson via use-livecode
<[hidden email]> wrote:

> Aah: paint, as I don't really want lots of "artifacts" lying around
> after the exercise.
>
> Richmond.
>
> On 2/25/17 12:07 pm, hh via use-livecode wrote:
>> Assuming you wish to draw, not to paint:
>>
>> local gg="goofy", fc="255,0,0", ls=3
>>
>> on mouseUp
>>    lock screen
>>    if there is no grc gg then create grc gg
>>    set style of grc gg to "polygon" -- or "line"
>>    set points of grc gg to (250,250),(375, 375)
>>    set lineSize of grc gg to ls
>>    set forecolor of grc gg to fc
>>    unlock screen
>> end mouseUp
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...