Dec 232017
 
Turbo Pascal source for TVG103.ZIP.
File TVG103-S.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Turbo Pascal source for TVG103.ZIP.
File Name File Size Zip Size Zip Type
STYX.PAS 4999 1649 deflated
STYX.TPU 5216 2439 deflated
TVGDEMO.PAS 16823 4572 deflated
TVGRAPH.DOC 2031 919 deflated
TVGRAPH.HST 958 451 deflated
TVGRAPH.IN0 5053 1137 deflated
TVGRAPH.IN1 29551 6248 deflated
TVGRAPH.LIC 935 389 deflated
TVGRAPH.PAS 21863 6864 deflated
TVGRAPH.TPU 22576 10468 deflated

Download File TVG103-S.ZIP Here

Contents of the TVGRAPH.DOC file


TVGRAPH 1.03
TURBO VISION
using TURBO VISION In EGA/VGA graphics
(C) Mindware 1991
Brisbane,QLD,Australia
Fido : 3:640/305.1

0. See Modified TVDEMO program and STYX.PAS to show you how to do things

1. All that is required is to include TVGRAPH in the uses statement in your
main program and amazing - TVGRAPH will work in graphics mode.

2. Declarations are as follows

type
PGRect=^GRect;
GRect=Trect;

PGPoint=^GPoint;
GPoint=TPoint; (* These two just to avoid confusion *)

3. Graphics IDs
All "text" windows are given a graphics ID of 0, each window you want
to use graphics in - you need to assign a graphics ID to it, if a line is
drawn using the internal RawDrawLine - then if the current graphics window
is the same as the location you are writing to on the screen then the graphics
will overwrite - else the graphics will be clipped.

function NextGraphId:byte; (* Get next available graphics id *)
procedure UseGraphId(b:byte); (* Use graphics ID for following graphics *)
procedure ReleaseGraphId(b:byte); (* release graphics ID for use *)

To assign a graphics id to a character cell ensure you write character n with
attribute 0FFh into the location using standard TURBO VISION methods.


4. Other routines
procedure TextToGraphics(T:TRect;var G:Grect);
(*converts a Text rectangle T into a Grect based on current screen locations *)

procedure RawDrawLine(X1,Y1,X2,Y2:integer;Color:word);
(* draw line from using screen co-ordinates *)

procedure DrawLine(X1,Y1,X2,Y2:integer;Color:word);
(* draw line using global co-ordinates i.e. *)
(* X is 0..GraphXMax (10000) *)
(* Y is 0..GraphYMax=(07500) *)

function ISin(X:integer):integer;
function ICos(X:integer):integer;
(* Integer trig functions - X is number of 16ths of a degree *)
(* returns number -1024..1024 representing -1.000..+1.000 *)




 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)