Newsgroups: comp.object.logic
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!zombie.ncsc.mil!news.duke.edu!news-feed-1.peachnet.edu!gatech!swrinde!cs.utexas.edu!news.sprintlink.net!uunet!in1.uu.net!newsflash.concordia.ca!nstn.ns.ca!cs.dal.ca!cfn.cs.dal.ca!ad398
From: ad398@cfn.cs.dal.ca (Stepan S. Vartanov)
Subject: DOS/Win C++ src:rotation (inc. fonts),diagrams,runtime equations
Message-ID: <D5AAMM.AIB@cs.dal.ca>
Sender: usenet@cs.dal.ca (USENET News)
Nntp-Posting-Host: cfn.cs.dal.ca
Organization: Chebucto FreeNet
X-Newsreader: TIN [version 1.2 PL2]
Date: Sat, 11 Mar 1995 16:18:21 GMT
Lines: 106

[ Article crossposted from comp.os.ms-windows.programmer.tools ]
[ Author was Stepan S. Vartanov ]
[ Posted on Sat, 11 Mar 1995 16:03:52 GMT ]

KNOW-HOW SDK. 
DEMO available on:
<href="http://www.cfn.cs.dal.ca/~ad398/_xygraf.txt">

This DEMO introduces 3 libraries (source codes for Borland C++ 3.x and upper)
   for DOS/Windows developments. All parts of this archive are FREE and AS IS.

C O N T E N T S.
    Brief products description.
	K N O W - H O W . G R A F
	KNOW-HOW.GRAF
	KNOW-HOW.SLANG
    About Demo programs.
    Additional  development  tools.
    Contacts.
*****************************************************************************
	    K N O W - H O W . G R A F  6.0

    KNOW-HOW.GRAF 6.0. Business and  Scientific diagrams.  Supported types of
grafs:  MARKER,  LINE, LINE-and-MARKER,   BAR,  BAR-3D, STACKED BAR (should be
expanded with Pie diagrams and user-defined graphics). Manual or automatic
calculation  of  the  nice-looking numbers and labels  positions, multiple
datasets,  four  axes (two X  and  two  Y)  with  different  scales.
Product is  based  on the KNOW-HOW.GRAPHICS (see below) and have access to
all its tools, including Zooming,  Scrolling,  Rotation  and  other. So it is
possible to draw X-Y graphic rotated to any angle around any point.
Same code for DOS and Windows.
*****************************************************************************
    KNOW-HOW.X-Y GRAPHICS 6.0 incapsulates calls to  functions  of concrete
library and provide common code for DOS/Windows graphics.
Current  version  works  with  DOS  (BGI) and  Windows (GDI), but  only minor
changes are required  to add  interface to any  other  library which  support
standart drawing functions (moveTo, lineTo and so on).
This code also  support Zooming,  Scrolling, Rotation  and  Complex  (Nested)
Rotation  of image  or part  of it.  This  features  could  be used  for  the
development  of  CAD systems, Vector  drawing tools, and writing of platform-
independent  programs. Size of  code  written with  KH.GRAPHICS is 2-5 times
smaller then without it.
BGI fonts ( including filled fonts ) could  be used  under DOS  and  Windows,
all  image   transformations,  including  rotations  are  valid  with  them.
As you can see from the file DEMO.CPP, this library hides from the programmer
the details of drawing, such as Windows Pens allocation - deallocation.
*****************************************************************************
    KNOW-HOW.SLANG 6.0. Basic-like language  with  access  to KH.GRAPHICS and
KH.GRAF functions. Could be  used  in  C++  program  to  acces  its  specific
functions as well. Multy file projects
Usage: Data  processing  tools, Data  presentations (load/calc/plot/drawing),
Vector  drawing  tools,  BGI  /  GDI  maketing tools (no compilation stage).

	 <<< All source codes available >>>
_____________________________________________________________________________
About Demo programs.

This ZIP file contains demo programs of KNOW-HOW.GRAPHICS, KNOW-HOW.GRAF and
could give five first impression about KNOW-HOW.SLANG. All drawing in this
demo is performed using calls to the KNOW-HOW.GRAPHICS functions (and
therefore is platform-independent).
Program create (simplified! demo version!) KH.Slang interpreter and runs
Slang programs (graf.vec and calendar.vec).
(You can draw the same things from your C++ using only KH.Graf, of course,
but I choose Slang interpretation because it is ease to test - no stage of
compilation and very difficult to hung-up).

What is happened in this program? Instead of creating the code to control
position of the current graphic primitive, we use KHG to remember scaling,
scrolling mirror reflections and rotation center/angle information.

GRAF.VEC contains calls to KH.GRAF to plot on the screen few graphics.
CALENDAR.VEC and BIRD.VEC draw calendar with the picture.

ZIP also contains KH.GRAPHICS demo programs for DOS and Windows. This programs
draws the same picture as CALENDAR.VEC, but directly from C++ program (not as
Slang interpreter). Listing of C++ code is included as DEMO.CPP file and
for Slang code see *.VEC files.

This programs demonstrate KH.GRAPHICS and KH.GRAF, but KH.Slang is much more
complex. Program SLANG.EXE which you could find in the ZIP is very simple
and does not pretend to be SLANG demo. I wrote it during two hours using one
of the OWL examples, so if some things looks familiar to you do not be
surprized. This program should illustrate KH.GRAPHICS (if you run CALENDAR.VEC
program) or KH.GRAF (GRAF.VEC file). I suppose to upload more realistic SLANG
demo to ftp.cica.indiana and to Compuserve in the nearest future.
****************************************************************************
Additional  development  tools  include  heap  check  modules  (DOS only) for
memory leaks detections even if program hung-up the system. You can get
hard (printed) copy of the protocol of all memory allocations/deallocations,
with information about heap errors.
XY_GRAF.EXE contain simplified version of this tool (you do not need to
modify your code, but only to include LIB-file to the project). After the
execution of program you have message:
before: xxx; after: yyy
heapcheck: z
If before != after, you forget to delete some objects.
If heapcheck != 2, you delete something twice, or write something to the
wrong memory location.

	 <<< All source codes available >>>
****************************************************************************
Stepan Vartanov, ad398@cfn.cs.dal.ca



