Programming with Quartz -  David Gelphman,  Bunny Laden

Programming with Quartz (eBook)

2D and PDF Graphics in Mac OS X
eBook Download: PDF | EPUB
2010 | 1. Auflage
704 Seiten
Elsevier Science (Verlag)
978-0-08-045963-9 (ISBN)
Systemvoraussetzungen
Systemvoraussetzungen
73,95 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Written by members of the development team at Apple, Programming with Quartz is the first book to describe the sophisticated graphics system of Mac OS X. By using the methods described in this book, developers will be able to fully exploit the state-of-the-art graphics capabilities of Mac OS X in their applications, whether for Cocoa or Carbon development. This book also serves as an introduction to 2D graphics concepts, including how images are drawn and how color is rendered. It includes guidance for working with PDF documents, drawing bitmap graphics, using Quartz built-in color management, and drawing text. Programming with Quartz is a rich resource for new and experienced Mac OS X developers, Cocoa and Carbon programmers, UNIX developers who are migrating to Mac OS X, and anyone interested in powerful 2D graphics systems.

* This is the definitive guide to the revolutionary graphics system of Mac OS X that uses the Portable Document Format (PDF) as the basis of its imaging model.
* It contains the latest on programming with Quartz for Mac OS X version 10.4.
* Carefully crafted and extensive code examples show how to accomplish most of the drawing tasks possible with Quartz.
Written by members of the development team at Apple, Programming with Quartz is the first book to describe the sophisticated graphics system of Mac OS X. By using the methods described in this book, developers will be able to fully exploit the state-of-the-art graphics capabilities of Mac OS X in their applications, whether for Cocoa or Carbon development. This book also serves as an introduction to 2D graphics concepts, including how images are drawn and how color is rendered. It includes guidance for working with PDF documents, drawing bitmap graphics, using Quartz built-in color management, and drawing text. Programming with Quartz is a rich resource for new and experienced Mac OS X developers, Cocoa and Carbon programmers, UNIX developers who are migrating to Mac OS X, and anyone interested in powerful 2D graphics systems. This is the definitive guide to the revolutionary graphics system of Mac OS X that uses the Portable Document Format (PDF) as the basis of its imaging model It contains the latest on programming with Quartz for Mac OS X version 10.4 Carefully crafted and extensive code examples show how to accomplish most of the drawing tasks possible with Quartz

front cover 1
copyright 5
table of contents 8
front matter 16
Foreword 16
Preface 20
Our Objective 20
Outline 21
Conventions and Assumptions 23
Source Code 24
Header Files 25
Quartz Technologies 26
See Also 27
Acknowledgments 29
body 30
1 Introducing Quartz 2D 30
A Bit of History 30
Quartz 2D Overview 37
What Software Can Use Quartz 2D? 39
Summary 1 41
See Also 1 41
2 Quartz 2D Drawing Basics 44
Quartz Graphics Contexts 44
Filling a Rectangle 45
Stroking a Rectangle 47
The Order of Fill and Stroke Operations 49
Transforming the Coordinate System 52
Painting with Alpha 59
Making Dashed Lines 61
Clipping a Drawing 65
Drawing PDF Content 67
More About Graphics Contexts 70
Summary 2 71
See Also 2 72
3 Using Quartz 2D in Cocoa 74
Xcode Overview 75
Creating a Cocoa Xcode Project in Tiger 75
Creating a View in Interface Builder 78
Connecting the Interface to the Code 82
Obtaining a Graphics Context in Cocoa 84
Writing the Drawing Code 85
Examining the Drawing Output 87
Cocoa Framework Drawing and Quartz 88
Summary 3 91
See Also 3 91
4 Using Quartz 2D in Carbon 94
Creating a Carbon Xcode Project 95
Setting Up a Carbon Window 97
Creating an Event Handler 102
Examining the Drawing Output 105
Using QDBeginCGContext 108
Summary 4 110
See Also 4 111
5 The Quartz Coordinate System and Coordinate Transformations 112
User Space and Device Space 112
Coordinate Transformations 115
The Current Transformation Matrix 116
The Mathematics of Affine Transforms 117
Saving and Restoring a Coordinate System 120
Affine Transform Convenience Functions 123
Creating a Skewed Coordinate System 127
Summary 5 129
See Also 5 130
6 Drawing with Paths 132
Properties of Paths 133
Path Construction Primitives 134
Path Construction Convenience Functions 140
Stroking Paths 148
Filling Paths 155
Clipping with Paths 158
CGPath Objects (Jaguar) 160
Anti-aliasing 163
Path Utility Functions 166
Summary 6 173
See Also 6 173
7 Color, Alpha Transparency, and the Quartz Graphics State 176
Color and Color Spaces 177
Alpha Transparency 195
Graphics State Parameters 202
Summary 7 210
See Also 7 211
8 Data Providers and Data Consumers 214
Data Providers 215
Data Consumers 227
Summary 8 231
See Also 8 231
9 Drawing Images 232
Creating CGImage Objects 233
Best Practices for Working with Images 270
Image Utility Functions 273
Writing Image Data Using CGImageDestination (Tiger) 284
Exporting to JPEG Using a QuickTime Exporter 287
Summary 9 288
See Also 9 289
10 Image Masking 292
Creating an Image Mask 293
Masking an Image (Tiger) 302
Using Color as a Mask (Tiger) 308
Clipping to a Mask (Tiger) 311
Summary 10 316
See Also 10 316
11 Text 318
Text Drawing Parameters 319
Drawing Text Using Quartz 325
Drawing Text Using Cocoa 335
Drawing Text Using Carbon 353
Drawing Text in a Flipped Coordinate System 367
Summary 11 370
See Also 11 370
12 Creating Bits 374
Bitmap Graphics Context 375
CGLayers (Tiger) 400
Caching Drawing Offscreen 408
Replacing CopyBits 420
Summary 12 422
See Also 12 422
13 Opening and Drawing PDF Documents 426
PDF Document Properties 427
Opening a PDF Document 429
Using PDF as a Graphical Interchange 430
Drawing PDF Pages 435
Handling Protected PDF Documents (Jaguar) 453
PDF Document Utility Functions 458
Summary 13 460
See Also 13 460
14 Creating and Examining PDF Documents 464
Creating New PDF Documents 464
Copying PDF Content to a Pasteboard 472
Adding Content to Existing PDF Documents 476
Adding Links to PDF Documents (Tiger) 484
Creating Encrypted PDF Output (Tiger) 491
PDF Document Generation Issues 495
Examining PDF Document Content (Panther, Tiger) 496
Summary 14 507
See Also 14 507
15 Advanced Drawing Features 510
Drawing with Patterns 510
Drawing with Shadows (Panther) 541
Drawing with Transparency Layers (Panther) 551
Drawing with Shadings (Jaguar) 560
Summary 15 591
See Also 15 592
16 Supporting PostScript and EPS Data 594
Overview of the Conversion Process 595
Quartz Conversion Functions and Callbacks (Panther) 596
Creating a PDF Data File from PostScript Data 598
Using Converted PostScript Data in Your Application 604
PSConverter Advanced Issues 609
Printing Source EPS Data 611
Guidelines for Supporting EPS Data in Your Application 618
Summary 16 619
See Also 16 620
17 Performance and Debugging 622
Optimizing Performance 622
Debugging Your Drawing 642
Summary 17 655
See Also 17 656
18 Creating Quartz Tools and Python Scripts 660
Python Scripting with Quartz (Panther) 661
Using Quartz in UNIX Tools 666
The PDF Workflow in Printing (Jaguar) 668
Summary 18 675
See Also 18 675
index 676

Erscheint lt. Verlag 26.7.2010
Vorwort Philip Schneider
Sprache englisch
Themenwelt Informatik Betriebssysteme / Server Macintosh / Mac OS X
Mathematik / Informatik Informatik Grafik / Design
Mathematik / Informatik Informatik Software Entwicklung
ISBN-10 0-08-045963-3 / 0080459633
ISBN-13 978-0-08-045963-9 / 9780080459639
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)
Größe: 31,9 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

EPUBEPUB (Adobe DRM)
Größe: 28,6 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich