Re: FVWM: Vector Buttons

From: Thomas A. Gardiner <gardiner_at_pas.rochester.edu>
Date: Thu, 13 Jan 2000 10:07:14 -0500 (EST)

On Thu, 13 Jan 2000, Dan Espen wrote:

>"Thomas A. Gardiner" <gardiner_at_pas.rochester.edu> writes:

>> 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).
>
>How many pixels high are your title bar?

20

>Even though the vector buttons are defined in units of 100, I'm guessing
>that the button itself might be 20x20 pixels.
>
>Given that a vector is not a pixel, but a instead a line segment, I
>think your going to find it very difficult to create a circle. With
>all the truncation going on, even if there were floating point
>calculations involved, its going to be pretty hard to get the
>endpoints of the line segments in adjacent pixel locations.

Actually, the button vector I described as working good for a circle is
not all that bad... Maybe a little jagged, but I think I can live with
that.

>Vector buttons are nice, but if you really want total control of the button
>appearance, pixmaps are the way to go. They don't resize, but you can
>control every pixel, and use any color.

Yes, I know, it's just the last part which I don't like. Right now, I
kinda' like the vector buttons because the lines are so simple and the
last setup I had was getting a bit too fancy (I took pixmaps from
Enlightenment's Shiny Metal theme). Actually, what's so difficult about
resizing? I wrote a little code to resize pgm's and it was pretty easy.
(certainly easier than the stuff I see in the source code for fvwm2!) I'm
not familiar with the xpm format; is that the tricky part?

Tom

--
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 - 09:13:49 GMT

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