| Introduction << Table of Contents >> Creating Images |
|---|
Working with a Renderer
The Renderer class is an abstract class from which the concrete
renderer implementations are derived. Each implemetation renders to a format or
a class of formats. Currently there are renderers provided for rendering to images
and PDF documents. Each of these renderers is covered in the next chapters.
The basic steps to rendering are common to all renderers.
- Obtain an instance of the desired renderer
- Set the presentation
- Set any desired common (e.g. the date) and/or renderer specific properties (e.g. the font collection)
- Render using a renderer specific
render()method
We will see examples of this in the next two sections.
Once you have obtained an instance of a renderer, it may be reused as you like. You can simply change properties and re-render or indeed change the presentation.
The Renderer class, and therefore all renderers, provides three methods
to let you access some basic information about the presentation once you have
set it (step 2). getSlideCount() returns the number of slides in the
presentation, getAspectRatio() provides the aspect ratio
(the width divided by the height) and isHidden(int slide) returns whether
a particular slide has been set to be hidden during slide shows. Hidden slides may be rendered—it
is purely a user choice whether you are rendering the slides in the presentation or the
slides that would appear in a slide show.
The Renderer class also provides access to the common date property.
The date is used when resolving autotext variables in the presentation. PowerPoint
uses the current time and date, which is the renderer's default, but you can change
this using the date property.
| Introduction << Table of Contents >> Creating Images |
|---|
©2007 Google - Terms of Service - Privacy Policy - Google Home
