4 5 */
	faddp %st, %st(3) 	/* 0 3 4 5 */
	faddp %st, %st(1) 	/* 3 4 5 */

	/*
	 * st(2) = S(0) * M(0, 0) + S(1) * M(0, 1) + S(2) * M(0, 2)
	 * st(1) = S(0) * M(1, 0) + S(1) * M(1, 1) + S(2) * M(1, 2)
	 * st(0) = S(0) * M(2, 0) + S(1) * M(2, 1) + S(2) * M(2, 2)
	 */

	fld %st(3)
	fmul %st, %st(1)
	fmul %st, %st(2)
	fmulp %st(3)

	fstps D(2)
	fstps D(1)
	fstps D(0)

	leal S(3), %esi
	decl %ecx

	leal D(3), %edi

	jnz 1b

	fstp %st(0)

	jmp 4f

	/*
	 * Transform (no rescale)
	 */
ALIGN
3:	flds S(0)
	fmuls M(0, 0)
	flds S(0)
	fmuls M(1, 0)
	flds S(0)
	fmuls M(2, 0)

	flds S(1)
	fmuls M(0, 1)
	flds S(1)
	fmuls M(1, 1)
	flds S(1)
	fmuls M(2, 1)

	/*
	 * st(5) = S(0) * M(0, 0)
	 * st(4) = S(0) * M(1, 0)
	 * st(3) = S(0) * M(2, 0)
	 * st(2) = S(1) * M(0, 1)
	 * st(1) = S(1) * M(1, 1)
	 * st(0) = S(1) * M(2, 1)
	 */

	fxch %st(2) 		/* 2 1 0 3 4 5 */
	faddp %st, %st(5) 	/* 1 0 3 4 5 */
	faddp %st, %st(3) 	/* 0 3 4 5 */
	faddp %st, %st(1) 	/* 3 4 5 */

	/*
	 * st(2) = S(0) * M(0, 0) + S(1) * M(0, 1)
	 * st(1) = S(0) * M(1, 0) + S(1) * M(1, 1)
	 * st(0) = S(0) * M(2, 0) + S(1) * M(2, 1)
	 */

	flds S(2)
	fmuls M(0, 2)
	flds S(2)
	fmuls M(1, 2)
	flds S(2)
	fmuls M(2, 2)

	/*
	 * st(5) = S(0) * M(0, 0) + S(1) * M(0, 1)
	 * st(4) = S(0) * M(1, 0) + S(1) * M(1, 1)
	 * st(3) = S(0) * M(2, 0) + S(1) * M(2, 1)
	 * st(2) = S(2) * M(0, 2)
	 * st(1) = S(2) * M(1, 2)
	 * st(0) = S(2) * M(2, 2)
	 */

	fxch %st(2) 		/* 2 1 0 3 4 5 */
	faddp %st, %st(5) 	/* 1 0 3 4 5 */
	faddp %st, %st(3) 	/* 0 3 4 5 */
	faddp %st, %st(1) 	/* 3 4 5 */

	/*
	 * st(2) = S(0) * M(0, 0) + S(1) * M(0, 1) + S(2) * M(0, 2)
	 * st(1) = S(0) * M(1, 0) + S(1) * M(1, 1) + S(2) * M(1, 2)
	 * st(0) = S(0) * M(2, 0) + S(1) * M(2, 1) + S(2) * M(2, 2)
	 */

	fxch %st(2) 	/* 2 1 0 */
	fstps D(0) 	/* 1 0 */
	fstps D(1) 	/* 0 */
	fstps D(2) 	/* */

	leal S(3), %esi
	decl %ecx

	leal D(3), %edi

	jnz 3b

	/*
	 * Skip normalize if it isn't needed
	 */
4:	cmpl $0, 28(%esp)
	jz 2f

	/* Normalize required */

	movl 12(%esp), %esi 	/* esi = n */
	movl 16(%esp), %edi 	/* edi = d */

	subl $4, %esp 	/* temp var for 1.0 / len */

	/*
	 * (%esp) = length of first normal
	 */
	flds D(0)
	fmuls D(0)
	flds D(1)
	fmuls D(1)
	flds D(2)
	fmuls D(2)
	fxch %st(2)
	faddp %st(1)
	faddp %st(1)
	fsqrt
	fstps (%esp)

	jmp 3f

ALIGN
1:	/* %st(0) = length of next normal */
	flds D(3)
	fmuls D(3)
	flds D(4)
	fmuls D(4)
	flds D(5)
	fmuls D(5)
	fxch %st(2)
	faddp %st(1)
	faddp %st(1)
	fsqrt

	/*
	 * inverse the length of the current normal, which is
	 * already at (%esp).  This should overlap the prev
	 * fsqrt nicely.
	 */
	call inverse_nofp
	movl %eax, (%esp)

	/* multiply normal by 1/len */
	flds D(0)
	fmuls (%esp)
	flds D(1)
	fmuls (%esp)
	flds D(2)
	fmuls (%esp)
	fxch %st(3)
	fstps (%esp) 	/* store length of next normal */
	fstps D(1)
	fstps D(0)
	fstps D(2)
	leal D(3), %edi
3:	decl %esi
	jnz 1b

	/* finish up the last normal */
	call inverse_nofp
	movl %eax, (%esp)
	flds D(0)
	fmuls (%esp)
	flds D(1)
	fmuls (%esp)
	flds D(2)
	fmuls (%esp)
	fxch %st(2)
	fstps D(0)
	fstps D(1)
	fstps D(2)

	addl $4, %esp

2:	popl %edi
	popl %esi
	ret

/* end */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   /* $Id: copypix.c,v 3.9 1998/09/25 03:03:01 brianp Exp $ */

/*
 * Mesa 3-D graphics library
 * Version:  3.0
 * Copyright (C) 1995-1998  Brian Paul
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


/*
 * $Log: copypix.c,v $
 * Revision 3.9  1998/09/25 03:03:01  brianp
 * fixed front/back alpha copy bug per Sam Jordan
 *
 * Revision 3.8  1998/07/17 03:24:16  brianp
 * added Pixel.ScaleOrBiasRGBA field
 *
 * Revision 3.7  1998/05/31 23:50:36  brianp
 * cleaned up a few Solaris compiler warnings
 *
 * Revision 3.6  1998/04/01 02:58:52  brianp
 * applied Miklos Fazekas's 3-31-98 Macintosh changes
 *
 * Revision 3.5  1998/03/27 03:30:36  brianp
 * fixed G++ warnings
 *
 * Revision 3.4  1998/02/15 01:31:41  brianp
 * removed unused variables
 *
 * Revision 3.3  1998/02/08 20:22:14  brianp
 * LOTS of clean-up and rewriting
 *
 * Revision 3.2  1998/02/04 00:33:45  brianp
 * fixed a few cast problems for Amiga StormC compiler
 *
 * Revision 3.1  1998/02/01 22:16:34  brianp
 * include different headers (zooming)
 *
 * Revision 3.0  1998/01/31 20:49:24  brianp
 * initial rev
 *
 */


#ifdef PC_HEADER
#include "all.h"
#else
#include <string.h>
#include "context.h"
#include "copypix.h"
#include "depth.h"
#include "feedback.h"
#include "macros.h"
#include "pixel.h"
#include "span.h"
#include "stencil.h"
#include "types.h"
#include "zoom.h"
#endif



static vosktop+2<BR>
desktop-1<BR>
desktop-2<BR>
desktop%2</B><BR>
These commands switch between desktops. <CODE>desktop%2</CODE>
toggles between an odd desktop and the next higher even number. That
means between 1 and 2 or between 3 and 4.  This is useful to emulate
"Up" and "Down" in a virtual n*2 matrix, which is used by the KDE pager.
Similarly, <CODE>desktop+2</CODE> means "Right"; <CODE>desktop-1</CODE> means "Left".</LI>
</UL>
<P>
<P ALIGN="RIGHT">

<A HREF="index-3.html">Next</A>
<A HREF="index-1.html">Previous</A>
<A HREF="index.html#toc2">Table of Contents</A>
</P>
<CENTER>
<HR WIDTH="100%" SIZE=3 ALIGN=CENTER NOSHADE>
</CENTER>    
</FONT>

 
</BODY>
</HTML>
@


1.3
log
@Added release number
@
text
@@


1.2
log
@The updated KWM docs.
@
text
@d6 2
a7 2
<META NAME="keywords" CONTENT="KDE, Linux, QT, kwm, Window Manager">
<META NAME="description" CONTENT="The K Window Manager Handbook, Documentation for kwm 0.11.13">
@


1.1
log
@KWM Docs
@
text
@d6 2
a7 2
<META NAME="keywords" CONTENT="KDE, window manager">
<META NAME="description" CONTENT="KDE Window manager">
a43 1
<P>
d86 1
a86 1
<LI> <EM>Alt-middle mouse button</EM> raises the window</LI>
@
