previous chapter contents page top page next chapter


ScanConvertible

February 10, 1996

Defined in Graphics.def

Abstract
Mixes in with Object

Class Description

Class ScanConvertible is an abstract class that defines the interface for clipping.

Programming information

Instantiate: never
Subclass: rarely
Call its methods: never

You will almost never need to deal directly with class ScanConvertible unless you are re-implimenting some of the graphics routines. You will mix in class ScanConvertible when you create classes that need to deal with clipping, for example, if you were to re-implement class Path.

Methods defined by class ScanConvertible

Class ScanConvertible defines the following methods:

Method Description
ScanConvert Determines which parts of the scanlines to clip
ScanConvert2 Determines which portion of two scanlines to convert without copying and determingin the intersection
TrimBounds Indicates whether or not converting needs to be done
QuickClip Indicates whether or not converting needs to be done but doesn't consider the case of rectangular clips

Fields defined by class ScanConvertible

Class ScanConvertible doesn't define any fields.

Method Descriptions

ScanConvert

operation ScanConvert(origin: Dot; resolution: PixelDot; pixelOrigin: 
PixelDot; blitBounds: PixelBox; function: BlitFunction; VAR 
parameters: Parameters), noMethod;

Call ScanConvert to determine which part of the scanline to redraw. You will call this method over and over for the appropriate operation as changes are made.

ScanConvert2

operation ScanConvert2(clip2: Path; origin: Dot; resolution: PixelDot; 
pixelOrigin: PixelDot; blitBounds: PixelBox; function: BlitFunction; 
VAR parameters: Parameters), noMethod;

Call ScanConvert2 when you don't need to copy and intersect the scan lines. Note: This method is not implemented anywhere within the system.

TrimBounds

operation TrimBounds(VAR bounds: Box): SignedByte, noMethod;

Call TrimBounds to determine if you need to do any scan conversion. Returns -1 if you should call ScanConvert. Returns 0 if the scan lines don't intersect no scan conversion). Returns 1 if the box is not modified (no scan conversion).

QuickClip

operation QuickClip(VAR bounds: Box): Boolean, noMethod;

Returns true if you should call ScanConvert. Otherwise returns false.


Note: It is likely that this method will go away in the next release. Use TrimBounds instead.