没有合适的资源?快使用搜索试试~ 我知道了~
首页Mac OS X Quartz 2D与PDF图形编程:跨平台开发新趋势
"编程与Quartz 2D和PDF图形在Mac OS X中的应用指南是一本专为非Macintosh程序员设计的宝贵资源。该书阐述了如何利用Macintosh平台的强大功能,特别是针对iPhone和iPad等设备,展示了在Apple生态系统中创建、编辑PDF文件的专业能力。作者鼓励Windows、Linux和Unix平台的开发者认真考虑Mac作为其开发工具箱的扩展或替代选项,特别对于电影工作室、动画公司和特效制作机构,Mac能够提供所需的全套解决方案,实现跨平台工作的高效整合。 书中详细介绍了Quartz 2D,这是一种高性能的2D图形引擎,它将先进的图形技术封装得易于使用,适合于图形编程人员。同时,作为Cocoa编程的一部分,Quartz提供了清晰的文档和设施,使得开发者能够轻松地利用其功能来增强应用程序的视觉效果。Cocoa框架本身就充分利用了Quartz的优势,使得无论开发者是使用Cocoa、Carbon还是移植自其他平台的代码,都能无缝集成。 作为图形编程领域的重要参考资料,这本书深入浅出地解释了Quartz的工作原理,对图形处理和PDF操作进行了深入剖析。无论是经验丰富的专业人员,还是初入Mac OS X环境的新手,都会发现这本书成为他们案头必备的工具书。Michael B. Johnson博士,来自Pixar Animation Studios,高度评价了这本书,认为它是多年以来他梦寐以求的资源,对于所有Mac OS X上的图形程序员而言,无论是Cocoa开发者还是涉足其他技术栈的开发者,都将从中受益匪浅。"
资源详情
资源推荐
xv
The typical day-to-day experience of most programmers consists of what is
euphemistically known as “maintenance” (that is, fixing mistakes in existing
code) or, if their karma is particularly good, the occasional opportunity to add
new features to an existing library or application. While these activities (particu-
larly the latter) can be rewarding in their own ways, the programmer is always
constrained in some fashion by the requirement of compatibility with the exist-
ing code base, with other existing libraries and applications, or with old file for-
mats. While civilians (i.e., nonprogrammers) often fantasize about winning the
lottery, the equivalent for many programmers is the rare opportunity to create a
new library from scratch, without the constraints that often frustrate their
desires to extend and improve an existing library.
The advent of Mac OS X provided engineers at Apple with the opportunity (and
challenge) to start afresh. Apple wisely chose to bring forward those parts of the
original “toolbox” (APIs, in non-Apple speak) in the form of the Carbon inter-
face—this allowed the existing application base to be ported to Mac OS X in a
relatively painless fashion. However, Apple also recognized the tremendous
opportunity afforded them by the fact that new Mac OS X APIs needn’t be
backward compatible; they could start from scratch without being so con-
strained and could take advantage of new technologies, hardware capabilities,
and the lessons learned over many years of providing libraries and services to
application developers.
With Quartz 2D, Apple’s engineers have gone far beyond merely meeting that
challenge and have produced an API that is simply spectacular. Here’s a thought
experiment: close your eyes and imagine you’ve been given the opportunity to
write a modern 2D graphics API from the ground up—what would be on your
wish list? Certainly you’d want it to be device- and resolution-independent.
You’d want sophisticated color management—the ability to use a variety of color
spaces, including calibrated color—and you’d certainly want to support transpar-
ency and blending. You’d want sophisticated handling of text: layout, fonts, and
Unicode support. You’d want to be able to take advantage of widely used file for-
mats and libraries (such as QuickTime, JPEG, PostScript, EPS, and PDF) but be
independent of these as much as possible. You’d want it to be easy to do easy
things, like draw a circle or a box, and you’d want it to be as easy as possible to
do very complex things (for example, by providing a manageable interface to
Foreword
xvi
Foreword
inherently complex functionality such as with color management or bitmap file
formats). You’d want the API to be clean, consistent, elegant, and orthogonal so
programmers could create more of the incredible applications the Macintosh is
justifiably known for. You’d also want it to be blazingly fast to give users the best
possible experience. Quartz 2D fulfills all those wishes and much more.
The best API in the world isn’t going to go very far without adequate documen-
tation. At the very least one needs a reference manual, and Apple’s have histori-
cally been quite good. Reference manuals are not intended to teach program-
mers the how and why of using an API, and so one can find for almost any API a
number (often a large number) of books that purport to be tutorial in nature. I
don’t need to offer more than the observation that such books tend to be highly
variable in their value, to put it as diplomatically as possible. This is lamentable
but understandable; the task of describing a rich and powerful API is certainly
one of the most difficult in technical writing.
The authors of the book you now hold in your hands have met the challenge of
describing Quartz 2D in a simply spectacular fashion: this is unquestionably one
of the best API books I’ve ever encountered. The Quartz 2D API’s elegance, clar-
ity, and power is mirrored beautifully by the authors’ presentation: easy things
are easy to understand, while complex functionality is explained in as straight-
forward a fashion as possible. Many API how-to books fall down most dramati-
cally in their use of code examples—either they are much too shallow or much
too arcane or, worst of all, they will attempt to guide the reader through the
entire development cycle of a contrived application. Not so with this book—
indeed, the examples here are, well, exemplary; they’re chosen to guide the
reader from complete naiveté to mastery and are explained in such a way that
the application programmer understands
why
and not just
how
. This book has
two other great strengths. First, as with many APIs, Quartz 2D provides several
ways of accessing the library’s functionality, and the authors go to great effort to
explain the often subtle differences in the approaches and provide clear guide-
lines to the programmer for choosing the right approach. Second, the authors
have provided a liberal dose of advice on best practices: tidbits of information
regarding how to use the API correctly, which may not necessarily be obvious
even to experienced programmers.
The authors, in the preface that follows, have nicely described the goals and
organization of the book and have provided a broad overview of some of Quartz
2D’s functionality (that is, what makes it such a great API), so I won’t belabor
that here. Read the book! They also describe the intended audience, but since I
have an opinion here and the imprimatur to state it, I will belabor that aspect.
The Macintosh is so widely regarded for its “ease of use” that this phrase has
almost become a cliché. The Macintosh has been wildly successful in the artistic,
musical, and publishing communities. Both of these phenomena have led to the
Foreword
xvii
view among many non-Macintosh programmers that the Macintosh is not a seri-
ous machine for business or science, much less an appealing platform for hard-
core programming. I love the Macintosh for its ease of use, its “it just works”
nature, the beauty and elegance of its user interface, and the awesome applica-
tions available for it, but, even with all of this, I believe the Macintosh’s greatest
strength lies in its APIs—they are simply the best in the business.
The Macintosh is inarguably the best platform for users, but it is also the best
platform for developers as well. By using Quartz 2D in the Carbon or Cocoa
framework, developers can create the sorts of interactive applications for which
the Mac is famous, and with much greater ease than on other platforms. But
since Quartz 2D is not by its nature tied to either of these frameworks, program-
mers can take advantage of the tremendous power of the API in command-line
applications written in C and C++. Quartz 2D also has Python bindings for the
great majority of its functionality, allowing programmers to simultaneously take
advantage of Python and Quartz 2D. The authors don’t specifically mention it,
but it would be possible to write an interactive application with a GUI in either
X11 or Python and use most of the functionality of Quartz 2D.
In light of all this, I strongly encourage non-Macintosh programmers to pick up
this book and find out for themselves what a truly great development platform
we have in the Macintosh. Programmers and software managers at Windows,
Linux, and Unix shops should seriously consider the Macintosh as an addition to
(or replacement for!) their current stable of platforms. In particular, movie stu-
dios, animation houses, and special-effects facilities would do well to consider
that with Macintosh, a single platform can provide everything they need: 3D
applications (e.g., Maya and LightWave 3D), 2D applications (e.g., Adobe Pho-
toshop), compositing (Shake), digital video editing (Final Cut Pro), and so on, as
well as the best platform for developing in-house 3D and 2D applications. Let
Quartz 2D and this wonderful book show you the possibilities.
Philip J. Schneider
R&D Engineer
Industrial Light + Magic
October 2005
xix
This book describes the Quartz 2D graphics and imaging system in Mac OS X
and explains how to use the Quartz 2D application programming interface
(API). With the Portable Document Format (PDF) at the core of its imaging
model, Quartz 2D is a breakthrough technology for two-dimensional (2D)
graphics on personal computers. Quartz 2D provides the support you’d expect
for graphics primitives like lines, curves, rectangles, arbitrary paths, and images.
It also supports features such as translucency, layers, shadows, and a host of other
sophisticated effects. Not only can you create PDF documents, but you can draw
and dissect existing ones.
The Quartz 2D implementation is fast and easy to use. In addition to 2D-
drawing and PDF support, Quartz 2D reads, displays, and writes a wide variety
of bitmap image formats.
Color management is built into Quartz. Quartz 2D works behind the scenes
with ColorSync technology to make sure ICC color profiles are respected. Appli-
cations can use calibrated color spaces as well as device color spaces.
Quartz 2D drawing can be sent to a printer, captured to a PDF file, or rendered
to an offscreen bitmap just as easily as it can be drawn to the display. That’s
because drawing destinations are treated as abstractions. Applications can focus
on the drawing and let the system handle the process of rendering the content to
a specific destination.
Our Objective
This book is intended to familiarize developers with the capabilities of Quartz
2D and to get them programming Quartz graphics in their applications. The
book describes how best to use Quartz 2D and gives numerous code examples to
show how to accomplish many of the drawing tasks possible with Quartz 2D.
Any of the following will benefit from reading this book:
■
New Mac OS X developers who want to get started with 2D graphics in Mac
OS X.
■
Longtime Mac OS developers who have used the Carbon framework and
want to add powerful new drawing capabilities, support PDF documents, and
improve the quality of the graphics in their applications.
Preface
剩余696页未读,继续阅读
ostholz
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 最优条件下三次B样条小波边缘检测算子研究
- 深入解析:wav文件格式结构
- JIRA系统配置指南:代理与SSL设置
- 入门必备:电阻电容识别全解析
- U盘制作启动盘:详细教程解决无光驱装系统难题
- Eclipse快捷键大全:提升开发效率的必备秘籍
- C++ Primer Plus中文版:深入学习C++编程必备
- Eclipse常用快捷键汇总与操作指南
- JavaScript作用域解析与面向对象基础
- 软通动力Java笔试题解析
- 自定义标签配置与使用指南
- Android Intent深度解析:组件通信与广播机制
- 增强MyEclipse代码提示功能设置教程
- x86下VMware环境中Openwrt编译与LuCI集成指南
- S3C2440A嵌入式终端电源管理系统设计探讨
- Intel DTCP-IP技术在数字家庭中的内容保护
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功