Power Graphics Using Turbo Pascal

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Keith Weiskamp; Loren Heiny; Namir Shammas
Publisher: Wiley
Year: 1989

Language: English
Pages: 388
City: New York
Tags: Turbo Pascal, Pascal, Graphics, CAD

Contents
Preface
Chapter 1 The BGI Quick Tour
Getting Started
Initializing the BGI
Writing the Basic BGI Program
Error Checking
Working with Coordinates
Drawing Commands
Getting Down to Pixels
Drawing Figures
Filling Figures
Text and Fonts
Fractal Landscapes
Chapter 2 The BGI Drawing Functions
Working with Pixels
Plotting a Single Pixel
General Drawing Commands
Drawing Lines
Drawing Lines with Absolute Coordinates
Drawing Lines with Relative Coordinates
Setting a Line Style
Predefined Line Patterns
Determining the Current Line Style
User-Defined Line Styles
Drawing Rectangles
Working with Polygons
Arcs, Circles, and Ellipses
Drawing Arcs
Arc Endpoints
Circles and Ellipses
Fundamentals of Animation
Filling Regions
Setting the Fill Pattern
User-Defined Fill Patterns
Getting the Fill Pattern
Experimenting with User-Defined Fill Patterns
Using the Arrow Keys
Working with Flood-Fills
Chapter 3 The BGI Fonts and Text
Text in Graphics Mode
The Bit-Mapped Font
The Four Stroke Fonts
The BGI Text Functions
Writing Text to the Screen
Writing Text to a Pixel Location
An Example of Text Display
How Turbo Pascal Accesses Fonts
Selecting and Loading a Font
Errors in Loading a Font
Working with Text Justification
Determining the Current Text Settings
Determining the Character Dimensions
A Note about Vertical Character Dimensions
Determining the Character Dimensions
Magnifying Characters
Fitting Text Inside a Box
A Note on Clipping Text
Displaying Characters and Numbers
Extended Text Manipulation Routines
Graphics Version of write
Working with Text Input
Entering Numeric Values
Chapter 4 Presentation Graphics
The Basic Graph Types
Getting Started
Pie Charts
Drawing a Slice
Labeling Pie Slices
Making Each Slice Different
Creating a Legend
Emphasizing a Slice
Creating Bar Graphs
Three-Dimensional Bar Graphs
Coin Graphs
Animated Graphs
Chapter 5 Graphics Techniques In Two Dimensions
Screen Coordinates
Working with Aspect Ratios
Screen and World Coordinates
Mapping between Coordinate Systems
Transformations
Translation
Scaling a Two-Dimensional Polygon
Rotating a Two-Dimensional Polygon
The Shear Transform
A Matrix Demo
Object Oriented Programming
Working with OOP
An Object-Oriented Utility
The Internal Object List
Adding an Object
Selecting an Object
Chapter 6 Animation
A Closer Look at lnbetweening
Animating a Line
Working with lnbetweening
Working with Getlmage and Putlmage
Animating Objects On a Backdrop
Animating Multiple Objects
Limitations of Getlmage and Putlmage
Animating Using the Palette
Using Multiple Screen Pages
Chapter 7 Creating Mouse Tools
Starting with the Mouse
Mouse Overview
Accessing the Mouse Driver
The Mouse Functions
Mouse Initialization
More Mouse Routines
The Mouse Cursor
The Default Mouse Cursor
Mouse Position
Mouse Buttons
Mouse in a Box
More Mouse Control
Adding Keyboard Input
Emulating a Mouse
The Emulated Mouse Cursor
Emulated Mouse Position
Emulated Mouse Buttons
Putting Your Mouse to the Test
Chapter 8 Working with Icons
Why Icons?
Representing Icons
Saving Icons
Reading an Icon File
The Interactive Editor
Creating the Screen
Creating an Enlarged Icon
Displaying the Original Icon
Interacting with the User
Toggling an Icon Pixel
Exiting the Icon Editor
Sample Icons
Chapter 9 Pop-up Windows in Graphics
The Basic Approach
Working with a Stack
Initializing the Windows Package
The Pop-up Routine
A Closer Look at GPopup
Saving the Screen
Creating the Pop-up Window
Removing a Pop-up Window
Removing All Windows
Using the Windows Package
Test Program
Chapter 10 Interactive Drawing Tools
Interactive Drawing
An Interactive Graphics Package
Drawing Conventions
A Close Look at the Draw.Pas Tools
Drawing with a Pencil
Erasing
Spray Painting Effect
Drawing Lines
Drawing Polygons
Drawing Squares
Drawing Circles
Drawing Ellipses
Drawing Arcs
Chapter 11 A Paint Program
Overview of the Paint Program
The Unit Files
Setting Up the Environment
The Paint Routines
The Clear Screen Command
Quitting the Program
The Undo Operation
The Pull-down Menus
Changing the Fill Style
The Text Routine
User Interaction
Using the Paint Program
Enhancing the Paint Program
Ideas to Experiment With
Chapter 12
A CAD Program
Painting versus Drafting
Setting up the Screen
The Object List
Drawing Objects
Drawing Polygons and Circles
Working with Lines
Text as a Graphics Object
Displaying the Graphics Objects
Deleting a Graphics Object
The Duplicate Function
The Rotate Command
Changing the Drawing Order
Selecting and Moving an Object
Extending the CAD Program
Chapter 13 Three-Dimensional Graphics
Adding the Third Dimension
Using a Camera Model
Objects in Three Dimensions
Transforming from World to Eye Coordinates
Clipping in Three Dimensions
Perspective Projection
Object Files
Displaying a Three-Dimensional Object
Setting the Viewing Parameters
Using the Three-Dimensional Program
Sample Objects
Extending the Program
Index