All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.qd.Region

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.util.QTHandleRef
                   |
                   +----quicktime.qd.Region

public final class Region
extends QTHandleRef
implements QuickTimeLib, Cloneable
The Region represents an arbitary area or set of areas on the drawing coordinate plane. Methods are implemented for a corresponding QuickDraw structure used by QuickTime. Refer to Region in QuickTime documentation.


Constructor Index

 o Region()
Allocates a new empty region.
 o Region(PixMap)
Converts a specified BitMap or PixMap to a region.
 o Region(QDRect)
Allocates a new region specified by a rectangle.

Method Index

 o clone()
Copies the mathematical structure of the implicit region into a newly created region.
 o copy()
Copies the mathematical structure of the implicit region into a newly created region.
 o diff(Region)
Calculates the subtracts the specified explicit region from the implicit region and creates a new region representing that structure.
 o empty()
Determines whether a region is empty or not.
 o equalRgn(Region)
Compares two regions for sizes, shapes, and locations.
 o fromGraphicsImporter(GraphicsImporter)
Determines the current clipping region.
 o fromMovieBounds(Movie)
This method allows your application to determine a movie's boundary region.
 o fromMovieClip(Movie)
This method allows your application to determine a movie's clipping region.
 o fromMovieControllerBadge(MovieController, Region, boolean)
This method allows you to display a controller's badge.
 o fromMovieControllerBounds(MovieController)
This method returns the actual region occupied by the controller and its movie, if the movie is attached to the controller.
 o fromMovieControllerClip(MovieController)
This method allows you to obtain information describing a movie controller's clipping regions.
 o fromMovieControllerWindow(MovieController, QDGraphics)
This method allows your application to determine the window region that is actually in use by a controller and its movie.
 o fromMovieDisplayBounds(Movie)
This method allows your application to determine a movie's display boundary region.
 o fromMovieDisplayClip(Movie)
This method allows your application to determine a movie's current display clipping region.
 o fromMovieSegment(Movie, int, int)
This method allows your application to determine a movie's display boundary region during a specified segment.
 o fromTrackBounds(Track)
This method allows the media to limit the size of the track boundary rectangle.
 o fromTrackClip(Track)
This method allows your application to determine the clipping region of a track.
 o fromTrackDisplay(Track)
This method allows your application to determine the region a track occupies in a movie's graphics world.
 o fromTrackMovieBounds(Track)
This method allows your application to determine the region the track occupies in a movie's boundary region.
 o fromTrackSegment(Track, int, int)
This method allows your application to determine the region a track occupies in a movie's graphics world during a specified segment.
 o fromVideoChannel(VisualChannel)
Allows you to retrieve a channels clipping region.
 o getBounds()
Returns a copy of the bounding rectangle of the Region.
 o getRgnBBox()
Returns a copy of the bounding rectangle of the Region.
 o getSize()
Returns size of the Region.
 o inset(int, int)
Moves all points on the region boundary horizontally and vertically by adding the respective parameters to those points.
 o map(QDRect, QDRect)
Takes the implicit region with one rectangle, maps and scales it to another rectangle.
 o offset(int, int)
Moves the region horizontally and vertically by adding the respective parameters to all of the region.
 o pointIn(QDPoint)
Checks whether the pixel below and to the right of the point is within the region.
 o rect(QDRect)
Resets the mathematical structure to the specified rectangle.
 o rectIn(QDRect)
Checks whether the specified rectangle intersects the region.
 o sect(QDRect)
Calculates the intersection of this region and the incoming QDRect and creates a new region representing that structure.
 o sect(Region)
Calculates the intersection of two regions and creates a new region representing that structure.
 o setEmpty()
Resets the mathematical structure to the rectangle (0,0,0,0).
 o setRect(int, int, Dimension)
Resets the mathematical structure to the specified coordinates and sizes.
 o toString()
Print information about this object.
 o union(QDRect)
Calculates the union of this region and the incoming rect, and creates a new region representing that structure.
 o union(Region)
Calculates the union of two regions and creates a new region representing that structure.
 o xor(Region)
Calculates the difference between the union and intersection of two regions and creates a new region representing that structure.

Constructors

 o Region
 public Region() throws QTException
Allocates a new empty region.

QuickDraw::NewRgn

 o Region
 public Region(QDRect r) throws QTException
Allocates a new region specified by a rectangle.

QuickDraw::RectRgn

Parameters:
r - the specified rectangle
 o Region
 public Region(PixMap pMap) throws QTException
Converts a specified BitMap or PixMap to a region.

QuickDraw::BitMapToRegion

Parameters:
pMap - the specified pixmap

Methods

 o fromGraphicsImporter
 public static Region fromGraphicsImporter(GraphicsImporter gi) throws QTException
Determines the current clipping region.

QuickTime::GraphicsImportGetClip

Parameters:
gi - the GraphicsImporter
Returns:
The current clip region or null, if not possible
See Also:
getClip
 o fromMovieDisplayClip
 public static Region fromMovieDisplayClip(Movie m) throws QTException
This method allows your application to determine a movie's current display clipping region.

QuickTime::GetMovieDisplayClipRgn()

Parameters:
m - the Movie
Returns:
a Region object.
See Also:
getDisplayClipRgn
 o fromMovieDisplayBounds
 public static Region fromMovieDisplayBounds(Movie m) throws QTException
This method allows your application to determine a movie's display boundary region. The display boundary region encloses all of a movie's enabled tracks after the track matrix, track clip, movie matrix, and movie clip have been applied to all of the movie's tracks. This region is in the display coordinate system of the movie's graphics world.

QuickTime::GetMovieDisplayBoundsRgn()

Parameters:
m - the Movie
Returns:
a Region object.
See Also:
getDisplayBoundsRgn
 o fromMovieClip
 public static Region fromMovieClip(Movie m) throws QTException
This method allows your application to determine a movie's clipping region.

QuickTime::GetMovieClipRgn()

Parameters:
m - the Movie
Returns:
a Region object.
See Also:
getMovieClipRgn
 o fromMovieBounds
 public static Region fromMovieBounds(Movie m) throws QTException
This method allows your application to determine a movie's boundary region. This region is in the movie's display coordinate system. The movie boundary region encloses all of a movie's tracks after the union of the track clip and the track matrix has been applied to all the movie's tracks (but not to the movie itself).

QuickTime::GetMovieBoundsRgn()

Parameters:
m - the Movie
Returns:
a Region object specifying the movie boundary region.
See Also:
getBoundsRgn
 o fromMovieSegment
 public static Region fromMovieSegment(Movie m,
                                       int time,
                                       int duration) throws QTException
This method allows your application to determine a movie's display boundary region during a specified segment.

QuickTime::GetMovieSegmentDisplayBoundsRgn()

Parameters:
m - the Movie
time - Specifies the starting time of the movie segment to consider.
duration - Specifies the length of the segment to consider.
Returns:
a Region object.
See Also:
getSegmentDisplayBoundsRgn
 o fromMovieControllerBounds
 public static Region fromMovieControllerBounds(MovieController mc) throws QTException
This method returns the actual region occupied by the controller and its movie, if the movie is attached to the controller.

QuickTime::MCGetControllerBoundsRgn()

Parameters:
mc - the MovieController
Returns:
a Region object specifying the boundary region for this controller.
See Also:
getBoundsRgn
 o fromMovieControllerWindow
 public static Region fromMovieControllerWindow(MovieController mc,
                                                QDGraphics window) throws QTException
This method allows your application to determine the window region that is actually in use by a controller and its movie.

QuickTime::MCGetWindowRgn()

Parameters:
mc - the MovieController
window - Specifies the window. This may NOT be null.
Returns:
a Region object specifying the window region.
See Also:
getWindowRgn
 o fromMovieControllerClip
 public static Region fromMovieControllerClip(MovieController mc) throws QTException
This method allows you to obtain information describing a movie controller's clipping regions.

QuickTime::MCGetClip()

Parameters:
mc - the MovieController
Returns:
the clipping region of the entire movie controller
See Also:
getClip
 o fromMovieControllerBadge
 public static Region fromMovieControllerBadge(MovieController mc,
                                               Region movieRgn,
                                               boolean returnBadgeRgn) throws QTException
This method allows you to display a controller's badge.

QuickTime::MCDrawBadge()

Parameters:
mc - the MovieController
movieRgn - Specifies the boundary region of the controller's movie.
Returns:
A Region that gives information about the location of the badge.
See Also:
drawBadge
 o fromTrackClip
 public static Region fromTrackClip(Track t) throws QTException
This method allows your application to determine the clipping region of a track.

QuickTime::GetTrackClipRgn()

Parameters:
t - the Track
Returns:
a Region object specifying the clip region for this track.
See Also:
getClipRgn
 o fromTrackDisplay
 public static Region fromTrackDisplay(Track t) throws QTException
This method allows your application to determine the region a track occupies in a movie's graphics world.

QuickTime::GetTrackDisplayBoundsRgn()

Parameters:
t - the Track
Returns:
a Region object specifying the track's bounds region.
See Also:
getDisplayBoundsRgn
 o fromTrackMovieBounds
 public static Region fromTrackMovieBounds(Track t) throws QTException
This method allows your application to determine the region the track occupies in a movie's boundary region.

QuickTime::GetTrackMovieBoundsRgn()

Parameters:
t - the Track
Returns:
a Region object specifying the region the track occupies in a movie's boundary region.
See Also:
getMovieBoundsRgn
 o fromTrackBounds
 public static Region fromTrackBounds(Track t) throws QTException
This method allows the media to limit the size of the track boundary rectangle. Therefore, the region returned by GetTrackBoundsRgn may not be rectangular and may be smaller than the track boundary region.

QuickTime::GetTrackBoundsRgn()

Parameters:
t - the Track
Returns:
a Region object specifying the region track's media uses to do drawing.
See Also:
getBoundsRgn
 o fromTrackSegment
 public static Region fromTrackSegment(Track t,
                                       int time,
                                       int duration) throws QTException
This method allows your application to determine the region a track occupies in a movie's graphics world during a specified segment.

QuickTime::GetTrackSegmentDisplayBoundsRgn()

Parameters:
t - the Track
time - Specifies the starting time of the track segment to consider.
duration - Specifies the length of the segment to consider. Set this parameter to 0 to consider an instant in time.
See Also:
getSegmentDisplayBoundsRgn
 o fromVideoChannel
 public static Region fromVideoChannel(VisualChannel vc) throws QTException
Allows you to retrieve a channels clipping region.

QuickTime::SGGetChannelClip QuickTime::SGGetChannelClip

Parameters:
vc - the VisualChannel
Returns:
the clipping region or null if no clip.
See Also:
getClip
 o getSize
 public int getSize()
Returns size of the Region.

Overrides:
getSize in class QTHandleRef
 o getRgnBBox
 public QDRect getRgnBBox()
Returns a copy of the bounding rectangle of the Region.

Returns:
a rect
 o getBounds
 public QDRect getBounds()
Returns a copy of the bounding rectangle of the Region.

Returns:
a rect
 o rect
 public void rect(QDRect r)
Resets the mathematical structure to the specified rectangle. Destroys the previous mathematical structure of the implicit region.

QuickDraw::RectRgn

Parameters:
r - the specified rectangle
 o copy
 public Region copy() throws QTException
Copies the mathematical structure of the implicit region into a newly created region.

QuickDraw::CopyRgn


QuickDraw::MacCopyRgn

Returns:
A new region copy.
 o clone
 public Object clone()
Copies the mathematical structure of the implicit region into a newly created region.

QuickDraw::CopyRgn

Returns:
A new region copy.
Overrides:
clone in class Object
 o setEmpty
 public void setEmpty()
Resets the mathematical structure to the rectangle (0,0,0,0). Destroys the previous mathematical structure of the implicit region.

QuickDraw::SetEmptyRgn

 o setRect
 public void setRect(int x,
                     int y,
                     Dimension dim)
Resets the mathematical structure to the specified coordinates and sizes. Destroys the previous mathematical structure of the implicit region. May reset the structure to the rectangle(0,0,0,0), if bad parameters.

QuickDraw::SetRectRgn


QuickDraw::MacSetRectRgn

Parameters:
x - the specified leftmost position.
y - the specified topmost position.
dim - the specified width and height dimension.
 o offset
 public void offset(int dh,
                    int dv)
Moves the region horizontally and vertically by adding the respective parameters to all of the region.

QuickDraw::OffsetRgn


QuickDraw::MacOffsetRgn

Parameters:
dh - the specified horizontal offset.
dv - the specified vertical offset.
 o inset
 public void inset(int dh,
                   int dv)
Moves all points on the region boundary horizontally and vertically by adding the respective parameters to those points.

QuickDraw::InsetRgn

Parameters:
dh - the specified horizontal inset.
dv - the specified vertical inset.
 o sect
 public Region sect(Region regionB) throws QTException
Calculates the intersection of two regions and creates a new region representing that structure. May return an empty region if no intersection or one of the regions is empty.

QuickDraw::SectRgn

Parameters:
regionB - the specified intersecting region.
Returns:
The region of intersection.
 o sect
 public Region sect(QDRect r) throws QTException
Calculates the intersection of this region and the incoming QDRect and creates a new region representing that structure. May return an empty region if no intersection or one of the regions is empty.

QuickDraw::SectRgn

Parameters:
r - the specified intersecting rect.
Returns:
The region of intersection.
 o union
 public Region union(Region regionB) throws QTException
Calculates the union of two regions and creates a new region representing that structure. May return an empty region if both regions are empty.

QuickDraw::UnionRgn


QuickDraw::MacUnionRgn

Parameters:
regionB - the specified region to union with.
Returns:
The region of union.
 o union
 public Region union(QDRect rect) throws QTException
Calculates the union of this region and the incoming rect, and creates a new region representing that structure. May return an empty region if both regions are empty.

QuickDraw::UnionRgn

Parameters:
rect - the specified rect to union with.
Returns:
The region of union.
 o diff
 public Region diff(Region regionB) throws QTException
Calculates the subtracts the specified explicit region from the implicit region and creates a new region representing that structure. May return an empty region if the implicit region is empty.

QuickDraw::DiffRgn

Parameters:
regionB - the specified region to find difference with.
Returns:
The region of difference.
 o xor
 public Region xor(Region regionB) throws QTException
Calculates the difference between the union and intersection of two regions and creates a new region representing that structure. May return an empty region if both regions are coincident.

QuickDraw::XorRgn


QuickDraw::MacXorRgn

Parameters:
regionB - the specified region to xor with.
Returns:
The region of exclusively or.
 o rectIn
 public boolean rectIn(QDRect srcRect)
Checks whether the specified rectangle intersects the region.

QuickDraw::RectInRgn

Parameters:
srcRect - the specified source rectangle
Returns:
True if at least one bit of the rectangle is contained by the region, false otherwise.
 o equalRgn
 public boolean equalRgn(Region rgn)
Compares two regions for sizes, shapes, and locations.

QuickDraw::EqualRgn


QuickDraw::MacEqualRgn

Parameters:
obj - the specified comparision region
Returns:
true if both regions' sizes, shapes, and locations are identical, false otherwise.
 o empty
 public boolean empty()
Determines whether a region is empty or not.

QuickDraw::EmptyRgn

Returns:
True if region is empty, false otherwise.
 o map
 public void map(QDRect srcRect,
                 QDRect dstRect)
Takes the implicit region with one rectangle, maps and scales it to another rectangle.

QuickDraw::MapRgn

Parameters:
srcRect - the specified source rectangle
dstRect - the specified destination rectangle
 o pointIn
 public boolean pointIn(QDPoint pt)
Checks whether the pixel below and to the right of the point is within the region.

QuickDraw::PtInRgn

Parameters:
pt - the specified point.
Returns:
True if pt is contained by the region, false otherwise.
 o toString
 public String toString()
Print information about this object.

Returns:
a string representing this Region object
Overrides:
toString in class QTHandleRef

All Packages  Class Hierarchy  This Package  Previous  Next  Index