home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch 1.2.1.99;
- access;
- symbols;
- locks; strict;
- comment @ * @;
-
-
- 1.2
- date 93.02.07.23.24.26; author jason; state Exp;
- branches
- 1.2.1.1;
- next ;
-
- 1.2.1.1
- date 94.03.29.05.41.32; author jason; state Exp;
- branches;
- next 1.2.1.2;
-
- 1.2.1.2
- date 94.09.13.03.53.06; author jason; state Exp;
- branches;
- next 1.2.1.3;
-
- 1.2.1.3
- date 94.11.16.06.30.09; author jason; state Exp;
- branches;
- next 1.2.1.4;
-
- 1.2.1.4
- date 94.12.09.05.29.56; author jason; state Exp;
- branches;
- next ;
-
-
- desc
- @text drawing
- @
-
-
- 1.2
- log
- @Initial RCS Version
- @
- text
- @#include"agl.h"
-
- long TextX[MAX_WINDOWS],TextY[MAX_WINDOWS];
-
-
- /******************************************************************************
- void cmov2s(long sx,long sy)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmov2i(long sx,long sy)
- {
- if(OneToOne[CurrentWid]) /* bypass transforms if no effect */
- {
- TextX[CurrentWid]=sx;
- TextY[CurrentWid]=sy;
- }
- else
- cmov((float)sx,(float)sy,(float)0.0);
- }
-
-
- /******************************************************************************
- void cmovs(long sx,long sy,long sz)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmovi(long sx,long sy,long sz)
- {
- cmov((float)sx,(float)sy,(float)sz);
- }
-
-
- /******************************************************************************
- void cmov2s(short sx,short sy)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmov2s(short sx,short sy)
- {
- if(OneToOne[CurrentWid]) /* bypass transforms if no effect */
- {
- TextX[CurrentWid]=sx;
- TextY[CurrentWid]=sy;
- }
- else
- cmov((float)sx,(float)sy,(float)0.0);
- }
-
-
- /******************************************************************************
- void cmovs(short sx,short sy,short sz)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmovs(short sx,short sy,short sz)
- {
- cmov((float)sx,(float)sy,(float)sz);
- }
-
-
- /******************************************************************************
- void cmov2(float fx,float fy)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmov2(float fx,float fy)
- {
- if(OneToOne[CurrentWid]) /* bypass transforms if no effect */
- {
- TextX[CurrentWid]=fx;
- TextY[CurrentWid]=fy;
- }
- else
- cmov(fx,fy,(float)0.0);
- }
-
-
- /******************************************************************************
- void cmov(float fx,float fy,float fz)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void cmov(float fx,float fy,float fz)
- {
- float vert[3],rvert[3],pvert[3];
-
- vert[0]=fx;
- vert[1]=fy;
- vert[2]=fz;
-
- rotate_translate_position(vert,rvert);
- project_vertex(rvert,pvert);
-
- TextX[CurrentWid]=CurrentWidth*(pvert[0]+1.0)/2.0;
- TextY[CurrentWid]=CurrentHeight*(pvert[1]+1.0)/2.0;
- }
-
-
- /******************************************************************************
- void charstr(char *string)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void charstr(char *string)
- {
- Move(DrawRPort,TextX[CurrentWid],CurrentHeight-1-TextY[CurrentWid]);
- Text(DrawRPort,string,(ULONG)strlen(string));
- }
-
-
- /******************************************************************************
- void getcpos(short *cx,short *cy)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void getcpos(short *cx,short *cy)
- {
- *cx=TextX[CurrentWid];
- *cy=TextY[CurrentWid];
- }
- @
-
-
- 1.2.1.1
- log
- @Added RCS Header
- @
- text
- @a0 16
-
- /******************************************************************************
-
- $Id: text.c,v 1.2.1.1 2002/03/26 22:04:24 jason Exp jason $
-
- $Log: text.c,v $
- * Revision 1.2.1.1 2002/03/26 22:04:24 jason
- * Added RCS Header
- *
- * Revision 1.2.1.1 2002/03/26 22:00:51 jason
- * RCS/agl.h,v
- *
-
- ******************************************************************************/
-
-
- @
-
-
- 1.2.1.2
- log
- @fixed alignment of text
- @
- text
- @d4 1
- a4 1
- $Id: text.c,v 1.2.1.1 1994/03/29 05:41:32 jason Exp jason $
- a6 3
- * Revision 1.2.1.1 1994/03/29 05:41:32 jason
- * Added RCS Header
- *
- a16 1
- #ifndef NOT_EXTERN
- a17 1
- #endif
- d111 2
- a112 7
- /*
- TextX[CurrentWid]=CurrentWidth* (pvert[0]+1.0)/2.0+0.5;
- TextY[CurrentWid]=CurrentHeight*(pvert[1]+1.0)/2.0+0.5;
- */
-
- TextX[CurrentWid]=ViewPort[CurrentWid][0] + ViewPort[CurrentWid][1] * (pvert[0]+1.0)/2.0;
- TextY[CurrentWid]=ViewPort[CurrentWid][2] + ViewPort[CurrentWid][3] * (pvert[1]+1.0)/2.0;
- @
-
-
- 1.2.1.3
- log
- @adjust for borders
- @
- text
- @d4 1
- a4 1
- $Id: text.c,v 1.2.1.2 1994/09/13 03:53:06 jason Exp jason $
- a6 3
- * Revision 1.2.1.2 1994/09/13 03:53:06 jason
- * fixed alignment of text
- *
- d133 1
- a133 13
- short cx,cy;
-
- getcpos(&cx,&cy);
-
- cy=CurrentHeight-1-cy;
-
- if(Bordered[CurrentWid])
- {
- cx+=BorderWidth;
- cy+=BorderWidth+BorderHeight;
- }
-
- Move(DrawRPort,cx,cy);
- @
-
-
- 1.2.1.4
- log
- @added copyright
- @
- text
- @d1 1
- d4 1
- a4 4
- Copyright © 1994 Jason Weber
- All Rights Reserved
-
- $Id: text.c,v 1.2.1.3 1994/11/16 06:30:09 jason Exp jason $
- a6 3
- * Revision 1.2.1.3 1994/11/16 06:30:09 jason
- * adjust for borders
- *
- @
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-