search for books and compare prices
Tables of Contents for Windows Graphics Programming
Chapter/Section Title
Page #
Page Count
Preface
xxxiii
 
Basic Techniques and Knowledge
1
62
Basic Windows Programming in C/C++
2
18
Starting Your Browser
3
3
Drawing Directly to Desktop
6
1
Creating a Full-Screen Window
7
8
Drawing with DirectDraw
15
5
Assembly Language
20
5
Program Development Environment
25
11
Development and Testing Systems
25
1
Compilers
26
4
Microsoft Platform Software Development Kit
30
2
Microsoft Driver Development Kit
32
3
Microsoft Development Network Library
35
1
Win32 Executable File Format
36
12
Import Directory
41
4
Export Directory
45
3
Architecture of Microsoft Windows OS
48
12
Hardware Abstraction Layer
50
1
MicroKernel
50
1
Device Drivers
51
2
Window Management and Graphics System
53
1
Executive
54
2
System Services: Native API
56
1
System Processes
57
1
Services
58
1
Environment Subsystems
59
1
Summary
60
3
Further Reading
60
1
Sample Programs
61
2
Windows Graphics System Architecture
63
66
Windows Graphics System Components
64
10
Multimedia
67
1
Video for Windows
68
1
Still Image
69
1
OpenGL
70
1
Windows Media
71
1
OS Kernel Mode Components
72
1
Kernel Mode Drivers
72
2
GDI Architecture
74
6
Exported Functions from GDI32.DLL
74
1
GDI Function Areas
75
3
GDI System Service Calls
78
1
From Win32 GDI API to GDI Engine System Service Calls
79
1
DirectX Architecture
80
7
DirectX Components
81
3
DirectDraw Architecture
84
3
Printing Architecture
87
9
The Win32 Spooler Client DLL
89
1
Spooler System Service Process
90
1
Spooler Router
90
1
Print Provider
91
1
Print Processor
92
2
Language Monitor and Port Monitor
94
1
A Peek into the Spooler Process
95
1
Graphics Engine
96
10
Graphics Engine System Services
98
3
Graphics Render Engine
101
2
Graphics Engine Data Structures
103
1
Transform to Primitives
104
1
Font Drivers
105
1
Display Drivers
106
7
Video Port Driver and Video Miniport Driver
106
1
Display Driver Function Areas
106
1
Display Driver Initialization
107
1
Surface Drawing Calls, Hooking, and Punting
108
2
Other Driver Features
110
1
Display Driver Support for DirectDraw/Direct 3D
110
3
Printer Drivers
113
14
Microsoft Printer Driver Frameworks
114
1
Printer Driver Graphics DLL
115
4
An HTML Printer Driver
119
8
Summary
127
2
Further Reading
127
1
Sample Programs
128
1
GDI/DirectDraw Internal Data Structures
129
114
Handles and Object-Oriented Programming
130
8
Class and Object
131
1
Encapsulation and Information Hiding
131
4
Pointer vs. Handle
135
1
Identity Map
136
1
Table-based Mapping
137
1
A Handle Is Not Enough
137
1
Decoding GDI Object Handles
138
7
Stock Object Handles Are Constants
140
1
HGDIOBJ Is Not a Pointer
141
1
Process GDI Handle Limit Is Around 12,000
141
1
Systemwide GDI Handle Limit Is 16,384
142
1
Part of HGDIOBJ Is an Index
142
1
Part of HGDIOBJ Is a GDI Object Type
142
3
Locating the GDI Object Handle Table
145
7
Decoding the GDI Object Handle Table
152
8
pKernel Points to Paged Pool
155
1
nCount Is Partly a Selection Count
156
2
nProcess Makes GDI Handles Process-Bound
158
1
nUpper: More Checking for Handles
158
1
nType: Internal Object Type
159
1
pUser Points to User Mode Data Structure
160
1
User Mode Data Structure of GDI Objects
160
8
User Mode Brush Data: Solid Brush Optimization
160
2
User Mode Region Data: Rectangular Region Optimization
162
1
User Mode Font Data: Width Table
162
1
User Mode Device Context Data: Keeping the Settings
163
5
Accessing Kernel Mode Address Space
168
8
WinDbq and the GDI Debugger Extension
176
15
GDI Kernel Mode Data Structure
191
42
GDI Object Handle Table in the GDI Engine
191
1
GDI Object Types in the GDI Engine
192
1
Device Context in the GDI Engine
192
6
GDI Engine PDEV Structure
198
7
GDI Engine Surfaces
205
2
Device-Dependent Bitmaps in the GDI Engine
207
2
DIB Sections in the GDI Engine
209
1
Brushes in the GDI Engine
210
2
Pens in the GDI Engine
212
1
Palettes in the GDI Engine
213
1
Regions in the GDI Engine
214
6
Paths in the GDI Engine
220
4
Fonts in the GDI Engine
224
8
Other GDI Objects in the GDI Engine
232
1
DirectDraw Data Structure
233
7
Summary
240
3
Further Reading
241
1
Sample Programs
242
1
Spying in the Windows Graphics System
243
48
Spying on Win32 API Calls
244
21
Making of a Spy
246
1
Injecting Spying DLL
247
3
Hooking into API Calling Chain
250
2
Information Gathering
252
6
Data Dumping
258
4
Spy Control Program
262
3
Spying on Win32 GDI
265
9
The GDI API Definition File
266
1
The GDI Data Decoder
267
3
Complete API Spying
270
4
Spying on DirectDraw COM Interfaces
274
4
Virtual Function Table
274
2
The DirectDraw API Definition
276
1
Virtual Function Table Hacking
277
1
Spying on GDI System Calls
278
5
Spying on the DDI Interface
283
5
Summary
288
3
Further Reading
289
1
Sample Programs
289
2
Graphics Device Abstraction
291
66
Modern Video Display Card
292
14
Frame Buffer
292
4
Pixel Format
296
4
Double Buffering, z-Bufrering, and Texture
300
2
Hardware Acceleration
302
1
Display Device and Settings Enumeration
303
3
Device Context
306
23
Device Context Creation
308
1
Querying a Device's Capabilities
309
1
Attributes in Device Context
310
8
Device Context Associated with a Window
318
1
Displaying in a Multiple window Environment
318
3
Getting a Device Context Associated with a Window
321
3
Common Device Context
324
1
Class Device Context
325
1
Private Device Context
326
1
Parent Device Context
327
1
Other Device Contexts
327
1
Information Context
327
1
Memory Device Context
327
1
Metafile Device Context
328
1
Formalizing Device Context
329
5
Sample Program: Generic Frame Window
334
7
Toolbar Class
334
1
Status Window Class
335
1
Canvas Window Class
336
1
Frame Window Class
337
3
Test Program
340
1
Sample Program: Painting and Device Context
341
13
A Window's Update Region
341
2
WM_Paint Message
343
2
Visualize Window Painting Messages
345
9
Summary
354
3
Further Reading
354
1
Sample Programs
354
3
Coordinate Spaces and Transformation
357
46
The Physical Device Coordinate Space
359
2
The Device Coordinate Space
361
2
The Page Coordinate Space and Mapping Modes
363
13
MM_TEXT Mapping Mode
366
1
MM_LOENGLISH, MM_HIENGLISH Mapping Modes
367
2
MM_LOMETRIC and MM_HIMETRIC Mapping Modes
369
1
MM_TWIPS Mapping Mode
369
1
MM_ISOTROPIC Mapping Modes
370
1
MM_ANISOTROPIC Mapping Mode
371
3
Window and Viewport Origins
374
2
Other Window and Viewport Functions
376
1
The World Coordinate Space
376
15
Affine Transformations
377
4
The Win32 API for World Transformations
381
3
Using World Transformation
384
7
Using Coordinate Spaces
391
3
GDI Implementation: Mapping and Transformation
393
1
Sample Program: Scrolling and Zoom
394
7
Game Board Based on KScrollCanvas Class
399
2
Summary
401
2
Further Reading
401
1
Sample Programs
402
1
Pixels
403
50
GDI Objects, Handles, and Handle Table
404
11
GDI Object Storage
405
1
The GDI Object Table
406
2
The GDI Object Handle
408
1
The GDI Object API
409
3
GDI Object Leakage Detection
412
3
Clipping
415
14
Clipping Pipeline
415
2
Simple Regions
417
1
Clipping Region
418
4
The Meta Region
422
2
Five Regions in a Device Context
424
1
Visualizing Device Context Regions
425
4
Color
429
16
The RGB Color Space
430
3
The HLS Color Space
433
7
Indexed Color and Palette
440
4
Beyond the Basics
444
1
Drawing Pixels
445
3
Sample Program: Mandelbrot Set
448
2
Summary
450
3
Further Reading
451
1
Sample Programs
451
2
Lines and Curves
453
66
Binary Raster Operations
454
4
Background Mode and Background Color
458
1
Pens
459
16
Logical Pen Objects
459
2
Stock Pens
461
1
Simple Pens
462
3
Extended Pens
465
1
Cosmetic Pens
466
2
Geometric Pens
468
4
Query Logical Pens
472
1
A Wrapper Class for GDI Pen Objects
473
2
Lines
475
6
Bezier Curves
481
8
PolyDraw
485
3
Alternative Bezier Curve Definition: Pass All Points
488
1
Arcs
489
8
Specifying Arc Using Degrees: AngleArc
491
1
Drawing Arcs with Inside Frame Pens
492
1
Convert Arcs to Bezier Curves
493
4
Paths
497
14
Path Construction
498
2
Querying Path Data
500
4
Transform Path Object
504
4
Drawing Using a Path
508
3
Converting Path to Region
511
1
Sample: Drawing Your Own Styled-Lines
511
5
Summary
516
3
Further Reading
517
1
Sample Program
517
2
Areas
519
64
Brushes
520
12
Logical Brush Objects
520
1
Stock Brushes
521
1
Custom Brushes
522
1
Solid Brushes
522
1
Hatch Brushes
523
3
Bitmap Brushes
526
4
System Color Brushes
530
1
Logbrush Structure
531
1
Rectangles
532
7
Rectangle as a Data Structure
532
2
Drawing Rectangles
534
1
Rectangle
534
2
FillRect
536
1
FrameRect
536
1
InvertRect
536
1
DrawFocusRect
536
1
Drawing Edges and Controls
537
2
Ellipses, Chords, Pies, and Rounded Rectangles
539
4
Polygons
543
4
Polygon Fill Mode
544
3
Closed Paths
547
3
Regions
550
18
Region Object Creation
551
3
Operations on Region Objects
554
1
Querying a Region
554
5
Set Operations on Regions
559
2
Transforming Region Data
561
6
Painting Using Regions
567
1
Gradient Fills
568
6
Gradient Fill of Rectangles
570
3
Gradient Fills to Make 3D Buttons
573
1
Area Fills in Reality
574
6
Semitransparent Fill
575
1
Portable Gradient Fill in HLS Color Space
576
1
Radial Gradient Fill
577
1
Texture and Bitmap Fills
578
1
Pattern Fills
579
1
Summary
580
3
Further Reading
581
1
Sample Program
582
1
Bitmap Basics
583
84
Device-Independent Bitmap Formats
584
12
BMP File Format
585
1
Bitmap File Header
586
1
Bitmap Information Header
587
6
Bit Masks
593
1
Color Table
593
1
Pixel Array
594
1
Packed Device-Independent Bitmap
595
1
Divided Device-Independent Bitmap
596
1
A DIB Class
596
11
Displaying a DIB
607
8
StretchDIBits
607
1
Source Rectangle
608
1
Destination Rectangle and Stretch Modes
609
1
Color Format Conversion
610
1
Raster Operation
611
1
StrechDIBits Sample
611
2
SetDIBitsToDevice
613
2
Memory Device Contexts
615
1
Device-Dependent Bitmaps
616
13
CreateBitmap
617
1
CreateBitmapIndirect
618
1
GetObject on DDB
619
1
CreateCompatibleBitmap and CreateDiscardableBitmap
620
2
CreateDIBitmap
622
1
LoadBitmap
623
1
Copying Bitmaps between DIBs and DDBs
624
4
Access Raw DDB Pixel Array
628
1
Using DDBS
629
20
Displaying DDBs
630
1
Screen Scrambler
631
1
Various Ways of Displaying DDBs
632
4
Window/Screen Capturing
636
1
DDB Color Conversion
637
2
Using Bitmaps in Menus
639
5
Using a Bitmap as Window Background
644
5
DIB Section
649
16
CreateDIBSection
651
2
A Class for the DIB Section
653
2
GetObjectType/GetObject on DIB Sections
655
1
GetDIBColorTable/SetDIBColorTable
656
1
Using DIB Sections: Device-Independent Rendering
657
3
Using DIB Sections: High-Resolution Rendering
660
5
Summary
665
2
Further Reading
665
1
Sample Programs
665
2
Advanced Bitmap Graphics
667
64
Ternary Raster Operations
668
21
Raster Operation Encoding
668
4
Ternary Raster Operation Chart
672
2
Commonly Used Raster Operations
674
3
Blackness, Whitness
677
1
Pattern-Only ROPs: Patcopy, R3_Notcopypen
678
1
Source-Only ROPs: Srccopy, Notsrccopy
678
1
Destination-Only ROPs: R3_NOP, Dstinvert
678
1
Destination-Free ROPs: Mergecopy
678
3
Source-Free ROPs
681
1
Pattern-Free ROPs
682
3
Other Raster Operations
685
4
Transparent Bitmaps
689
20
Parallelogram Bit-Block Transfer: PlgBlt
690
8
Quaternary Raster Operations: MaskBlt
698
2
Simulating MaskBlt
700
4
Color Keying: TransparentBlt
704
1
Simulating TransparentBlt
705
4
Transparency Without a Mask Bitmap
709
6
Masking Using Geometric Shapes
709
2
Masking Using Clipping
711
1
Prefabricating Image
712
3
Alpha Blending
715
13
Simple Constant Alpha Blending
717
2
Fade In, Fade Out of Bitmaps
719
1
Layered Window
720
2
Alpha Channel: AirBrush
722
4
Simulating Alpha Blending
726
2
Summary
728
3
Further Reading
729
1
Sample Program
729
2
Image Processing Using Windows Bitmaps
731
40
Generic Pixel Access
732
4
Bitmap Affine Transformation
736
3
Fast Specialized Bitmap Transformer
739
3
Bitmap Color Transformation
742
7
Converting Bitmaps to Grayscale
745
1
Gamma Correction
746
3
Bitmap Pixel Transformation
749
10
Generic Pixel Transformation Class
749
4
Generic Channel-Splitting Class
753
3
Sample Channel Splitting
756
1
Histogram
757
2
Bitmap Spatial Filters
759
10
Smoothing and Sharpening Filters
764
1
Edge-Detection and Embossing Filters
765
2
Morphological Filters
767
2
Summary
769
2
Further Reading
770
1
Sample Program
770
1
Palettes
771
56
System Palette
772
8
Display Settings
773
1
Querying the System Palette
774
4
Static Colors
778
2
The Logical Palette
780
6
The Default Palette
781
1
The Halftone Palette
782
2
Creating a Customized Palette
784
2
Palette Messages
786
8
The WM_Querynewpalette
786
1
WM_Paletteischanging
787
1
WM_Palettechanged
788
1
A Test Program
789
5
Palette and Bitmaps
794
10
The Device-Dependent Bitmap and Palette
794
4
Device-Independent Bitmaps and Palette
798
3
A Palette Index in a DIB Color Table
801
2
The DIB Section and Palette
803
1
Color Quantization
804
12
Bitmap Color-Depth Reduction
816
8
Summary
824
3
Further Reading
824
1
Sample Program
825
2
Fonts
827
68
What's a Font?
828
14
Character Set and Code Page
829
5
Glyph
834
1
Relationship between Glyph and Character
835
1
Glyph Design Elements
836
1
Font
836
2
Typestyle and Font Family
838
4
Bitmap Fonts
842
5
Vector Fonts
847
3
TrueType Fonts
850
33
TrueType Font File Format
851
3
Font Header (``Head'' Table)
854
1
Maximum Profile (``Maxp'' Table)
855
1
Character-to-Glyph Index Mapping (``Cmap'' Table)
856
3
Index to Location (``Loca'' Table)
859
1
Glyph Data (``Glyf'' Table)
859
11
Glyph Instructions
870
5
Horizontal Metrics (``Hhea'' and ``Htmx'' Tables)
875
3
Kerning (``kern'' Table)
878
2
OS/2 and Window Metrics (``OS/2'' Table)
880
1
Other Tables
881
1
TrueType Collections
882
1
Font Installation and Embedding
883
8
Font Resource File
884
1
Install Public Fonts
884
1
Install Private or Multiple Master OpenType Fonts
885
1
Install Fonts from Memory Image
885
1
Font Embedding
886
4
System Font Lists
890
1
Summary
891
4
Further Reading
891
2
Sample Programs
893
2
Text
895
112
Logical Fonts
896
18
Windows Typography Terminology
897
1
Stock Fonts
898
2
Creating Logical Fonts
900
5
Logical to Physical Font Mapping
905
2
Panose Typeface Matching
907
7
Querying Logical Font
914
17
Metrics for Bitmap and Vector Fonts
916
3
Metrics for True Type/Open Type Fonts
919
5
Explore Logfont and Font Metrics
924
1
Font Metrics Accuracy
925
3
Logical Coordinate Space Resolution vs. Accuracy
928
2
Font Point Size vs. Accuracy
930
1
Simple Text Drawing
931
16
Text Alignment
932
3
Right-To-Left Layout and Reading
935
3
Character Extra and Break Extra
938
3
Character Width
941
6
Advanced Text Drawing
947
21
Character-to-Glyph Mapping
947
1
Kerning
948
2
Character Placement
950
2
Extended Text Drawing
952
4
Uniscribe
956
1
Accessing Glyph
957
2
Glyph Bitmap
959
5
Glyph Outline
964
4
Text Formating
968
8
Tabbed Text Drawing
968
2
Simple Paragraph Formatting
970
3
Device-Independent Text Formatting
973
3
Text Effects
976
29
Coloring Text
977
3
Text Styles
980
3
Text Geometry
983
6
Text as Bitmap
989
1
Display Text Using Glyph Bitmaps
989
3
Converting Text to Bitmap
992
2
Embossing and Engraving on Bitmap Background
994
2
Text as Curve
996
1
Using a GDI Path for Text
996
2
Transforming Path Data
998
4
3D Text
1002
2
Text as Region
1004
1
Summary
1005
2
Further Reading
1005
1
Sample Program
1006
1
Metafile
1007
60
Metafile Basics
1008
16
Creating an Enhanced Metafile
1009
2
Playing an Enhanced Metafile
1011
4
Querying an Enhanced Metafile
1015
4
Exchanging an Enhanced Metafile
1019
1
Saving Drawings to an EMF File
1020
1
Loading an EMF from a Resource
1021
1
Putting an EMF on Static Control
1022
1
Exchanging with the Clipboard
1023
1
Inside an Enhanced Metafile
1024
23
EMF Records
1025
2
Classifying EMF Record Types
1027
4
Decoding EMF Records
1031
2
Simple GDI Objects in an EMF
1033
1
Bitmaps in an EMF
1034
3
Regions in an EMF
1037
1
Paths in an EMF
1037
1
Palettes in an EMF
1038
2
Coordinate Spaces in an EMF
1040
3
Draw Commands in an EMF
1043
2
Texts in an EMF
1045
1
EMF Device Independence
1045
2
Enumerating an EMF
1047
13
C++ Class for EMF Enumerating
1048
1
Slow Motion in an EMF Playback
1049
1
Tracing an EMF Playback
1050
3
Changing an EMF Dynamically
1053
2
Deriving an EMF from an EMF
1055
2
EMF Playback Details
1057
1
Undocumented EMF Record Types
1058
1
GDI Comment
1059
1
An EMF as a Programming Tool
1060
5
An EMF Decompiler
1060
3
Capture an EMF Spool File
1063
2
Summary
1065
2
Further Reading
1065
1
Sample Programs
1066
1
Printing
1067
64
Understanding the Spooler
1068
21
Printing Process
1068
2
Printer Control Language
1070
1
Text-Based Printer Control Language
1070
1
Raster-Based Printer Control Language
1071
1
Page Description Language
1072
2
Printing Directly to a Port
1074
2
Printing Through the Spooler
1076
4
EMF Print Processor
1080
2
Enumerating Printers
1082
2
Querying a Printer
1084
1
Set Up a Printer Driver
1084
5
Basic Printing Using GDI
1089
15
Printing Common Dialog Boxes
1089
7
Creating Printer Device Context
1096
2
Querying Printer Device Context
1098
3
Outline of a Print Job
1101
3
Design for Printing
1104
13
Uniform Logical Coordinate Space
1105
3
Paper Simulation
1108
1
Multipage, Multicolumn Display
1109
1
Multipage Printing
1110
2
Generic Printing Class
1112
5
Drawing on Printer Device Context
1117
11
Coordinate Space Units
1118
1
Text
1119
2
Bitmap
1121
2
JPEG Image Printing
1123
5
Summary
1128
3
Further Reading
1129
1
Sample Programs
1129
2
DirectDraw and Direct 3D Immediate Mode
1131
70
Component Object Model (COM)
1133
7
COM Interface
1133
1
COM Class
1134
1
Creating a COM Object
1135
1
Hresult
1136
1
DirectX and COM
1137
3
DirectDraw Basics
1140
18
IDirectDraw 7 Interface
1140
3
IDirectDraw Surface 7 Interface
1143
4
Drawing on a DirectDraw Surface
1147
1
Hardware-Accelerated Drawing
1147
1
GDI Drawing
1148
2
Direct Pixel Access
1150
2
Color Matching
1152
3
IDirectDraw Clipper Interface
1155
1
Simple DirectDraw Window
1155
3
Building a DirectDraw Graphics Library
1158
24
Pixel Drawing
1159
3
Line Drawing
1162
4
Area Fill
1166
1
Clipping
1167
3
Off-Screen Surface
1170
3
Transparency Through Color Keying
1173
1
Font and Text
1173
5
Not Quite a Game
1178
4
Direct 3D Immediate Mode
1182
16
Creating a Direct 3D Immediate Mode Environment
1183
4
Handling Window Resizing
1187
1
Two-Step Rendering
1188
1
Putting Direct 3D into a Window
1189
2
Texture Surface
1191
2
A Direct 3D Immediate Mode Sample
1193
5
Summary
1198
3
Further Reading
1198
1
Sample Programs
1199
2
Index
1201