Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Notes > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Pictures and Clip Regions

CONTENTS

This note describes a problem that affects creation of QuickDraw pictures.

[Jan 01 1986]






Introduction

When a GrafPort is created, the fields in the GrafPort are given default values; one of these is the clip region, which is set to the rectangle (-32767, -32767, 32767, 32767). If you create a picture, then call DrawPicture with a destination rectangle that is not the same size as the picFrame without ever changing the default clip region, nothing will be drawn.

When the picture frame is compared with the destination rectangle and the picture is scaled, the clip region is scaled too. In the process of scaling, the clip region you end up overflows and becomes empty, and your picture doesn't get drawn. If you call ClipRect(thePort^.portRect) before you record the picture, the picture will be drawn correctly. The clipping on the destination port when playing back the picture is irrelevant: once a picture is incorrectly recorded, it is too late.

Back to top

References

QuickDraw

Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (40K).

Download