FVWM: Vector Buttons

From: Thomas A. Gardiner <gardiner_at_pas.rochester.edu>
Date: Thu, 13 Jan 2000 08:21:30 -0500 (EST)

Hi,

        I've got a few quick questions...

1) Is there a maximum number of allowable points which can be used in a
vector button? Somewhere between 10 and 20 I get an error saying that it
was a "bad button style".

2) More is not necessarily better! I wanted to draw a circle, so I wrote
a 5-line c-program to pick points on a circle at regularly spaced angular
increments. This way I get, 3-> triangle, 4-> diamond or square, ... To
make a circle we want essentially a many sided polygoon. As the number of
points increases for the same circle radius the button highlighting
becomes distorted. That is the line becomes distorted. It stands to
reason that if the input is higher resolution than can be displayed
nothing should happen; it should look just like the lower resolution
counterpart.


Without looking at the code I'd guess that this is caused by the
discretization error of using integers for what should really be a
floating point number (especially since it must be scaled to the titlebar
height).

( I can send examples if desired...)

The nicest circle I can come up with so far is

#RoundButton: Limits 23-77, radius of 27
########################################
AddButtonStyle 6 \
        vector 9 69x31_at_0 77x50_at_0 69x69_at_0 50x77_at_0 31x69_at_0 \
        23x50_at_1 31x31_at_1 50x23_at_1 69x31_at_1

Pushing this up to a radius of 30 gives rise to funny dots in the
coordinate directions like this one.

#RoundButton: Limits 20-80, radius of 30
########################################
AddButtonStyle 6 \
        vector 9 71x29_at_0 80x50_at_0 71x71_at_0 50x80_at_0 29x71_at_0 \
        20x50_at_1 29x29_at_1 50x20_at_1 71x29_at_1

Manually editing the points to get rid of the points requires changing the
numbers to reflect the first round button like this before the points or
dots go away.

#RoundButton: Limits 20-80, radius of 30 (Manually edited...)
########################################
AddButtonStyle 6 \
        vector 9 71x29_at_0 77x50_at_0 71x71_at_0 50x77_at_0 29x71_at_0 \
        23x50_at_1 29x29_at_1 50x23_at_1 71x29_at_1

Any ideas??? The part which bothers me is that if I change the height of
the titlebar then the button appearance will most likely change so that
buttons which work good for me may not work well for others.

Finally one last question. (Wow, and I thought this was going to be
short...) Is it possible to set the light and dark colors used for vector
buttons? If not are they fixed or dependent on the button color.

Thanks,
Tom

_________________________________________________________________________
Thomas Gardiner
gardiner_at_pas.rochester.edu

University of Rochester
Department of Physics and Astronomy
P. O. Box 270171
Rochester, NY 14627-0171

(716) 275-9625 Office 2
(716) 275-0537 Office 1
(716) 275-8527 fax
__________________________________________________________________________

The scientist does not study nature because it is useful; he studies it
because he delights in it, and he delights in it because it is beautiful.
If nature were not beautiful, it would not be worth knowing, and if nature
were not worth knowing, life would not be worth living.- Henri Poincare
__________________________________________________________________________


--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Jan 13 2000 - 07:28:01 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:50 BST