Re: FVWM: Re: resizing windows

From: Neil Zanella <nzanella_at_morgan.ucs.mun.ca>
Date: Mon, 14 Sep 1998 21:18:58 -0230 (NDT)

On 14 Sep 1998, Carl R. Witty wrote:

> I'm pretty sure I've used a window manager (I don't remember which
> one) which would divide the window into 9 equal rectangles:
>
> 1 2 3
> 4 5 6
> 7 8 9
>
> If you started a resize while the mouse was in region 1, 3, 7, or 9,
> it would resize that corner. If you started a resize while the mouse
> was in region 2, 4, 6, or 8, it would resize that size. I don't
> remember what would happen if you started a resize from region 5.

Now I see where you're coming from.
Here is an alternative to the problem. Divide a window like this:

Join the points 1,*,2,*,3,*,4,*,5,*,6,*,8,* in that order.

(see diagram below)

with straight lines. The hard part is computing the positions of the

points. To do that first draw a circle centered at *, then divide the

circle in 8, then draw a box around the circle, and shrink the box so that

the vertical side is original_side * height / widh . This defines a

compression of the contnets of the box and hence the points on the circle.

Then draw the lines *----1', *-----2', ... *----9' where 1', 2', ..., 8'

were those points on the circle. These lines intersect the frame at points

1, 2, 3, 4, 5, 6, 7, 8

This gives you the reqired points 1,2,3,4,5,6,7,8 . Now you only have to

worry about the behavior at point *. Chose whichever you prefer, eg. one

corner goes to the center.



<------------------- width ----------->

+----------1--------------2-----------+ ^
| | |
| | |
| | |
8 3
| |
| * |
| | height
7 |
| 4
| | |
| | |
| | |
+----------6--------------5-----------+ ^



Best regards and wishes,

Neil

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Sep 14 1998 - 18:49:30 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST