Fading MouseTrails
Author |
Message |
Monkeyf4ce
|
Posted: Thu Mar 10, 2016 7:19 pm Post subject: Fading MouseTrails |
|
|
I made a Mouse trail but I need help trying to fade it so we can see the background.
This is what I have so far:
procedure MouseTrail
var x, y, oldx, oldy, b : int := -1
var c : int := 0
loop
% Get the current location of the mouse
mousewhere (x, y, b)
% if the mouse has moved and the button is pressed.
if (x not= oldx or y not= oldy) then
% Draw a circle around the mouse location
drawfilloval (x, y, 8, 8, c)
% Change the color
c := (c + 1) mod 16
oldx := x
oldy := y
end if
end loop
end MouseTrail |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Fri Mar 11, 2016 2:46 pm Post subject: RE:Fading MouseTrails |
|
|
Fading is actually pretty difficult in Turing. The easiest method I think is to use transparent gif images instead of drawing ovals. |
|
|
|
|
|
Dreadnought
|
Posted: Sun Mar 13, 2016 12:56 pm Post subject: Re: Fading MouseTrails |
|
|
As insectoid said, fading is difficult. Something not quite as difficult (still not easy) would be to do what Windows does for mouse pointer trails and only show the last few mouse pointers. |
|
|
|
|
|
|
|