All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.qd.QDGraphics
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.util.QTPointerRef
|
+----quicktime.qd.QDGraphics
- public final class QDGraphics
- extends QTPointerRef
- implements QuickTimeLib
A color graphics port defines a complete drawing environment that determines where
and how color graphics operations take place.
To create an offscreen QDGraphics (in traditional QuickDraw parlance a GWorld)
any one of the various constructors can be used.
The QDGraphics from... calls will return the existing destination graphics of the
first supplied object. For the fromNativeGraphics this will always be an on screen
graphics (in traditional QuickDraw parlance a CGrafPort). For the other calls the
type of the QDGraphics returned is dependant on the destination graphics of the object
that the application has established.
-
kDefaultPixelFormat
- This is the default pixel format that is used to create offscreen graphics contexts when
no format is used.
-
kNativeSize
- This is the size (the number of bytes) that are required for this class
-
scratch
- This holds a reference to the scratchGWorld that you can use manually in
calls such as Movie.setGWorld.
-
validScratch
- This holds a reference to the scratchGWorld that you can use
as a temporary destination graphics and still be considered as a valid
destination graphics by QTDrawable objects.
-
QDGraphics(ImageCompressionDialog, QDRect, int)
- Creates an offscreen QDGraphics based on the current compression settings.
-
QDGraphics(ImageDescription, int)
- Creates an offscreen QDGraphics object from the width, height, depth, and color table
of a specified image description structure.
-
QDGraphics(int, QDRect)
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port.
-
QDGraphics(int, QDRect, ColorTable, GDevice, int)
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port.
-
QDGraphics(int, QDRect, int)
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port.
-
QDGraphics(QDRect)
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port.
-
clipRect()
- To change the clipping region of this QDGraphics, use the ClipRect procedure.
-
clipRect(QDRect)
- To change the clipping region of this QDGraphics, use the ClipRect procedure.
-
eraseArc(QDRect, int, int)
- EraseArc draws a wedge of the oval bounded by the rectangle that you specify in the area parameter with the
background pattern for the current graphics port.
-
eraseOval(QDRect)
- Using the background pattern for the current graphics port and the patCopy pattern mode,
the EraseOval procedure draws the interior of an oval just inside the bounding rectangle that
you specify in the area parameter.
-
erasePoly(Polygon)
- Using the patCopy pattern mode, ErasePoly draws the
interior of the polygon passed in the poly parameter
with the background pattern for the current graphics port.
-
eraseRect(QDRect)
- Erases the specified rect with the current back color.
-
eraseRgn(Region)
- Erases the specified region with the current back color.
-
eraseRoundRect(QDRect, int, int)
- EraseRoundRect draws the interior of the rounded rectangle bounded by the rectangle that you specify
in the area parameter with the background settings of the current graphics port.
-
frameArc(QDRect, int, int)
- Using Pen size of the graphics pen for the current graphics port,
FrameArc draws an arc of the oval bounded by the rectangle that you
specify in the area parameter.
-
frameOval(QDRect)
- Using the Pen mode, and size of the graphics pen for the current graphics port,
the FrameOval procedure draws an outline just inside the oval with the bounding rectangle that you
specify in the area parameter.
-
framePoly(Polygon)
- Using the current graphics port’s pen size,
FramePoly plays back the line-drawing commands that define
the polygon passed in the poly parameter.
-
frameRect(QDRect)
- Using the pen size of the graphics pen for the current graphics port,
the FrameRect procedure draws an outline just inside the rectangle that you specify in the area parameter.
-
frameRgn(Region)
- Draws an outline just inside the region you pass in the area parameter.
-
frameRoundRect(QDRect, int, int)
- Using the Pen size of the graphics pen for the current graphics port, FrameRoundRect
draws an outline just inside the rounded rectangle bounded by the rectangle that you specify
in the area parameter.
-
fromCSequence(CSequence)
- This method determines the location of the previous image buffer allocated
by the compressor.
-
fromDSequenceImage(DSequence)
- This method helps you determine the location of the offscreen image buffer
allocated by the decompressor.
-
fromDSequenceScreen(DSequence)
- This method enables you to determine the location of the offscreen buffer
allocated by the decompressor.
-
fromGraphicsImporter(GraphicsImporter)
- Call this method to obtain the QDGraphics of the object.
-
fromMovie(Movie)
- Your application can determine a movie's graphics world by calling the getGWorld method.
-
fromMovieController(MovieController)
- This method returns a movie controller's color graphics port.
-
fromNativeGraphics(MacNativeGraphics)
- This will return a QDGraphics object from a native graphics object
-
fromNativeGraphics(WinNativeGraphics)
- This will return a QDGraphics object from a native graphics object
QuickTime::GetNativeWindowPort
-
fromSequenceGrabber(SequenceGrabber)
- Returns the QDGraphic context of the sequence grabber.
-
getBackColor()
- Returns the current background color of the QDGraphic.
-
getBounds()
- The port rectangle that defines a subset of the pixel map to be used
for drawing.
-
getClip()
- This method returns the clip Region of the port.
-
getCPixel(int, int)
- Returns the RGB color for the pixel at the location you
specify in the h and v parameters.
-
getForeColor()
- Returns the current foreground color of the
QDGraphic.
-
getPixelSize(int)
- Returns the pixel size for a given pixel format.
-
getPixMap()
- A PixMap object which describes the pixels in this QDGraphics.
-
getPort()
- Returns the current QDGraphics.
-
getPortRect()
- The port rectangle that defines a subset of the pixel map to be used
for drawing.
-
getVisClipRgn()
- This method returns intersection of visRgn and clipRgn of the port.
-
invertArc(QDRect, int, int)
- InvertArc inverts the pixels enclosed by a wedge of the oval bounded by the rectangle
that you specify in the area parameter.
-
invertOval(QDRect)
- The InvertOval procedure inverts the pixels enclosed by an oval just inside
the bounding rectangle that you specify in the area parameter.
-
invertPoly(Polygon)
- invertPoly inverts the pixels enclosed by the polygon passed in the poly parameter.
-
invertRoundRect(QDRect, int, int)
- The InvertRoundRect procedure inverts the pixels enclosed by the rounded rectangle bounded by the rectangle
that you specify in the area parameter.
-
isOffscreen()
- This returns true if the QDGraphics is an offscreen GWorld or an onscreen
CGrafPort.
-
line(int, int)
- Starting at the current location of the graphics pen, the Line procedure
draws a line the horizontal distance that you specify in the h
parameter and the vertical distance that you specify in the v parameter.
-
lineTo(int, int)
- The LineTo procedure draws a line from the graphics pen’s current location
in the current graphics port to the new location (h,v), which you specify in the
local coordinates of the current graphics port.
-
makeThumbnail(QDRect, int)
- Creates an 80-by-80 pixel thumbnail picture from the pixmap associated with this QDGraphics.
-
move(int, int)
- The Move procedure moves the graphics pen from its current location
in the current graphics port a horizontal distance that you specify
in the h parameter and a vertical distance that you specify in the
v parameter.
-
moveTo(int, int)
- The MoveTo procedure changes the graphics pen’s current location to
the new horizontal coordinate you specify in the h parameter and
the new vertical coordinate you specify in the v parameter.
-
paintArc(QDRect, int, int)
- Using the pen mode of the current graphics port, PaintArc
draws a wedge of the oval bounded by the rectangle that you specify in the area parameter.
-
paintOval(QDRect)
- Using the pen mode for the current graphics port,
the PaintOval procedure draws the interior of an oval just inside the bounding rectangle
that you specify in the area parameter.
-
paintPoly(Polygon)
- Using the pen pattern and pattern mode for the current graphics port,
PaintPoly draws the interior of a polygon
passed in the poly parameter.
-
paintRect(QDRect)
- Paints the specified rect with the current foreground color.
-
paintRgn(Region)
- Paints the specified region with the current foreground color.
-
paintRoundRect(QDRect, int, int)
- Using Pen mode of the graphics pen for the current graphics port, the PaintRoundRect procedure draws
the interior of the rounded rectangle bounded by the rectangle that you specify in the area parameter.
-
penNormal()
- The PenNormal procedure restores the size, of the graphics pen
in the current graphics port to their initial values:
a size of 1 pixel by 1 pixel.
-
penSize(int, int)
- The PenSize procedure sets the width that you specify in
the width parameter and the height that you specify in
the height parameter for the graphics pen in the current graphics port.
-
setBackColor(QDColor)
- Sets the current background color of the
QDGraphic.
-
setClip(Region)
- This method sets the clip Region of the port.
-
setCPixel(int, int, QDColor)
- For the pixel at the location you specify in the h and v parameters,
the setCPixel procedure sets a pixel value that most closely matches
the RGB color that you specify in the cPix parameter.
-
setForeColor(QDColor)
- Sets the current foreground color of the QDGraphics.
-
toString()
- Print information about this object.
kNativeSize
public static final int kNativeSize
- This is the size (the number of bytes) that are required for this class
scratch
public static QDGraphics scratch
- This holds a reference to the scratchGWorld that you can use manually in
calls such as Movie.setGWorld. It is used in the QTDrawable interfaces
to signify that the QTDrawable is invisible (for instance when the QTCanvas
that hosts the QTDrawable is hidden). It should not be reset by an application.
validScratch
public static QDGraphics validScratch
- This holds a reference to the scratchGWorld that you can use
as a temporary destination graphics and still be considered as a valid
destination graphics by QTDrawable objects.
kDefaultPixelFormat
public static final int kDefaultPixelFormat
- This is the default pixel format that is used to create offscreen graphics contexts when
no format is used. It is the same format as Java image classes use internally
ie. ARGB at 32bits per pixel.
QDGraphics
public QDGraphics(ImageCompressionDialog d,
QDRect rp,
int flags) throws QTException
- Creates an offscreen QDGraphics based on the current compression settings.
QuickTime::SCNewGWorld()
- Parameters:
- rp - the boundaries of the graphics world.
- flags - flags as specified to NewGWorld.
- Returns:
- a QDGraphics object
- See Also:
- newGWorld
QDGraphics
public QDGraphics(ImageDescription id,
int flags) throws QTException
- Creates an offscreen QDGraphics object from the width, height, depth, and color table
of a specified image description structure.
QuickTime::NewImageGWorld
- Parameters:
- flags - holding graphics world flags.
- Returns:
- a QDGraphics.
- See Also:
- newGWorld
QDGraphics
public QDGraphics(QDRect bounds) throws QTException
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port. Uses a pixel depth of 32 bits in ARGB format
and no special flags settings. By default the pixels are locked.
QuickTime::QTNewGWorld
- Parameters:
- bounds - the boundary rectangle and port rectangle for the offscreen
pixel map
QDGraphics
public QDGraphics(int pixelFormat,
QDRect bounds) throws QTException
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port. By default the pixels are locked.
QuickTime::QTNewGWorld
- Parameters:
- pixelFormat - the format of the pixels.
- bounds - the boundary rectangle and port rectangle for the offscreen
pixel map
QDGraphics
public QDGraphics(int pixelFormat,
QDRect bounds,
int flags) throws QTException
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port. By default the pixels are locked.
QuickTime::QTNewGWorld
- Parameters:
- pixelFormat - the format of the pixels.
- bounds - the boundary rectangle and port rectangle for the offscreen
pixel map
- flags - options available to your application. See GWorld flags above
QDGraphics
public QDGraphics(int pixelFormat,
QDRect bounds,
ColorTable cTable,
GDevice aGDevice,
int flags) throws QTException
- An offscreen graphics world in Color QuickDraw contains a GWorld - and
its handles to associated PixMap and ColorTables - that describe an offscreen
graphics port. By default the pixels are locked.
QuickTime::QTNewGWorld
- Parameters:
- pixelFormat - the format of the pixels.
- bounds - the boundary rectangle and port rectangle for the offscreen
pixel map
- cTable - a ColorTable
- aGDevice - a GDevice that should only be supplied if you set the noNewDevice
flag, otherwise it is just ignored and can be passed null.
- flags - options available to your application. See GWorld flags above
getPort
public static QDGraphics getPort()
- Returns the current QDGraphics.
QuickTime::GetPort
- Returns:
- a QDGraphics
getPixelSize
public static int getPixelSize(int pixelFormat) throws StdQTException
- Returns the pixel size for a given pixel format.
QuickTime::QTGetPixelSize
- Returns:
- pixel size
fromGraphicsImporter
public static QDGraphics fromGraphicsImporter(GraphicsImporter gi) throws StdQTException
- Call this method to obtain the QDGraphics of the object.
QuickTime::GraphicsImportGetGWorld
- Parameters:
- gi - the GraphicsImporter
- Returns:
- The current destination graphics port
- See Also:
- getGWorld
fromMovie
public static QDGraphics fromMovie(Movie m) throws StdQTException
- Your application can determine a movie's graphics world by calling the getGWorld method.
QuickTime::GetMovieGWorld()
- Parameters:
- m - the Movie
- Returns:
- The current destination graphics port
- See Also:
- getGWorld
fromMovieController
public static QDGraphics fromMovieController(MovieController mc) throws StdQTException
- This method returns a movie controller's color graphics port.
QuickTime::MCGetControllerPort()
- Parameters:
- mc - the MovieController
- Returns:
- A QDGraphics object representing the controller's graf port.
- See Also:
- getPort
fromSequenceGrabber
public static QDGraphics fromSequenceGrabber(SequenceGrabber sg) throws StdQTException
- Returns the QDGraphic context of the sequence grabber.
QuickTime::SGGetGWorld
- Parameters:
- sg - the SequenceGrabber
- Returns:
- The current graf port of the sequence grabber.
- See Also:
- getGWorld
fromCSequence
public static QDGraphics fromCSequence(CSequence c) throws StdQTException
- This method determines the location of the previous image buffer allocated
by the compressor.
QuickTime::GetCSequencePrevBuffer
- Parameters:
- c - the CSequence
- Returns:
- a QDGraphics object which is the graphics world for the image buffer
- See Also:
- prevBuffer
fromDSequenceImage
public static QDGraphics fromDSequenceImage(DSequence d) throws StdQTException
- This method helps you determine the location of the offscreen image buffer
allocated by the decompressor.
QuickTime::GetDSequenceImageBuffer
- Parameters:
- d - the DSequence
- Returns:
- a QDGraphics object which is the graphics world for the image buffer
- See Also:
- getImageBuffer
fromDSequenceScreen
public static QDGraphics fromDSequenceScreen(DSequence d) throws StdQTException
- This method enables you to determine the location of the offscreen buffer
allocated by the decompressor.
QuickTime::GetDSequenceScreenBuffer
- Parameters:
- d - the DSequence
- Returns:
- a QDGraphics object which is the graphics world for the screen buffer
- See Also:
- getScreenBuffer
fromNativeGraphics
public static QDGraphics fromNativeGraphics(WinNativeGraphics ng) throws NativeGraphicsException
- This will return a QDGraphics object from a native graphics object
QuickTime::GetNativeWindowPort
fromNativeGraphics
public static QDGraphics fromNativeGraphics(MacNativeGraphics ng) throws NativeGraphicsException
- This will return a QDGraphics object from a native graphics object
isOffscreen
public boolean isOffscreen()
- This returns true if the QDGraphics is an offscreen GWorld or an onscreen
CGrafPort.
- Returns:
- true if offscreen, else false
getPixMap
public PixMap getPixMap()
- A PixMap object which describes the pixels in this QDGraphics.
- Returns:
- a PixMap object
- See Also:
- PixMap
getPortRect
public QDRect getPortRect()
- The port rectangle that defines a subset of the pixel map to be used
for drawing.
- Returns:
- aRect object which defines the boundaries of the port rectangle
makeThumbnail
public Pict makeThumbnail(QDRect src,
int colorDepth) throws QTException
- Creates an 80-by-80 pixel thumbnail picture from the pixmap associated with this QDGraphics.
QuickTime::MakeThumbnailFromPixMap()
- Parameters:
- src - a QDRect object defining the portion of the image to use for the thumbnail
- colorDepth - specifies the depth at which the image is likely to be viewed
- Returns:
- a Pict object representing the thumbnail
getBounds
public QDRect getBounds()
- The port rectangle that defines a subset of the pixel map to be used
for drawing.
- Returns:
- aRect object which defines the boundaries of the port rectangle
getVisClipRgn
public Region getVisClipRgn() throws QTException
- This method returns intersection of visRgn and clipRgn of the port.
It is implemented on the low level of native calls to avoid extra
load on garbage collector
- Returns:
- Region object which defines the intersection of visible and clipping regions
getClip
public Region getClip() throws QTException
- This method returns the clip Region of the port.
QuickDraw::GetClip()
- Returns:
- Region object which defines the clip region
setClip
public void setClip(Region rgn)
- This method sets the clip Region of the port.
QuickDraw::SetClip()
- Parameters:
- rgn - Region object which defines the new clip region
clipRect
public void clipRect()
- To change the clipping region of this QDGraphics, use the ClipRect procedure.
This method will set the clip to the current port rect of the QDGraphics
QuickDraw::ClipRect()
- Parameters:
- r - the rect that will become the new clip rgn
clipRect
public void clipRect(QDRect r)
- To change the clipping region of this QDGraphics, use the ClipRect procedure.
- Parameters:
- r - the rect that will become the new clip rgn
getBackColor
public QDColor getBackColor()
- Returns the current background color of the QDGraphic.
QuickDraw::GetBackColor()
- Returns:
- QDColor
setBackColor
public void setBackColor(QDColor bColor)
- Sets the current background color of the
QDGraphic.
QuickDraw::RGBBackColor()
- Parameters:
- bColor - QDColor
frameArc
public void frameArc(QDRect area,
int startAngle,
int arcAngle) throws QDException
- Using Pen size of the graphics pen for the current graphics port,
FrameArc draws an arc of the oval bounded by the rectangle that you
specify in the area parameter. Use the startAngle parameter to specify
where the arc begins as modulo 360.
Use the arcAngle parameter to specify how many degrees the arc covers.
Specify whether the angles are in positive or negative degrees;
a positive angle goes clockwise, while a negative angle goes counterclockwise.
Zero degrees is at 12 o’clock high, 90° (or –270°) is at 3 o’clock, 180° (or –180°)
is at 6 o’clock, and 270° (or –90°) is at 9 o’clock. Measure other angles relative
to the bounding rectangle.
A line from the center of the rectangle through its upper-right corner is at 45°,
even if the rectangle isn’t square; a line through the lower-right corner is at 135°,
and so on.
The arc is as wide as the pen width and as tall as the pen height.
The pen location does not change.
QuickDraw::FrameArc()
- Parameters:
- area - The rectangle that defines an oval’s boundaries.
- startAngle - The angle indicating the start of the arc.
- arcAngle - The angle indicating the arc’s extent.
paintArc
public void paintArc(QDRect area,
int startAngle,
int arcAngle) throws QDException
- Using the pen mode of the current graphics port, PaintArc
draws a wedge of the oval bounded by the rectangle that you specify in the area parameter.
As in the FrameArc procedure described on page 3-72 of Inside Macintosh: Imaging With QuickDraw
and illustrated in Figure 3-21(Im), use the startAngle and arcAngle parameters to define the arc of the wedge.
The pen location does not change.
QuickDraw::PaintArc()
- Parameters:
- area - The rectangle that defines an oval’s boundaries.
- startAngle - The angle indicating the start of the arc.
- arcAngle - The angle indicating the arc’s extent.
eraseArc
public void eraseArc(QDRect area,
int startAngle,
int arcAngle) throws QDException
- EraseArc draws a wedge of the oval bounded by the rectangle that you specify in the area parameter with the
background pattern for the current graphics port. As in the FrameArc method on page 3-72 of Inside Macintosh:
Imaging With QuickDraw and as illustrated in Figure 3-21(Im), use the startAngle and arcAngle parameters to
define the arc of the wedge.
This method leaves the location of the graphics pen unchanged.
QuickDraw::EraseArc()
- Parameters:
- area - The rectangle that defines an oval’s boundaries.
- startAngle - The angle indicating the start of the arc.
- arcAngle - The angle indicating the arc’s extent.
invertArc
public void invertArc(QDRect area,
int startAngle,
int arcAngle) throws QDException
- InvertArc inverts the pixels enclosed by a wedge of the oval bounded by the rectangle
that you specify in the area parameter. Every white pixel becomes black and every black pixel becomes white.
As in the FrameArc procedure described on page 3-72 of Inside Macintosh: Imaging With QuickDraw and as
illustrated in Figure 3-21(Im), use the startAngle and arcAngle parameters to define the arc of the wedge.
This procedure leaves the location of the graphics pen unchanged.
QuickDraw::InvertArc()
- Parameters:
- area - The rectangle that defines an oval’s boundaries.
- startAngle - The angle indicating the start of the arc.
- arcAngle - The angle indicating the arc’s extent.
frameRoundRect
public void frameRoundRect(QDRect area,
int ovalWidth,
int ovalHeight) throws QDException
- Using the Pen size of the graphics pen for the current graphics port, FrameRoundRect
draws an outline just inside the rounded rectangle bounded by the rectangle that you specify
in the area parameter. The outline is as wide as the pen width and as tall as the pen height.
The pen location does not change. Use the ovalWidth and ovalHeight parameters to specify the diameters
of curvature for the corners of the rounded rectangle.
If a region is open and being formed, the outside outline of the new rounded rectangle is mathematically
added to the region’s boundary.
QuickDraw::FrameRoundRect()
- Parameters:
- area - The rectangle that defines the rounded rectangle’s boundaries.
- ovalWidth - The width of the oval defining the rounded corner.
- ovalHeight - The height of the oval defining the rounded corner.
paintRoundRect
public void paintRoundRect(QDRect area,
int ovalWidth,
int ovalHeight) throws QDException
- Using Pen mode of the graphics pen for the current graphics port, the PaintRoundRect procedure draws
the interior of the rounded rectangle bounded by the rectangle that you specify in the area parameter.
Use the ovalWidth and ovalHeight parameters to specify the diameters of curvature for the corners of the
rounded rectangle. The pen location does not change..
QuickDraw::PaintRoundRect()
- Parameters:
- area - The rectangle that defines the rounded rectangle’s boundaries.
- ovalWidth - The width of the oval defining the rounded corner.
- ovalHeight - The height of the oval defining the rounded corner.
eraseRoundRect
public void eraseRoundRect(QDRect area,
int ovalWidth,
int ovalHeight) throws QDException
- EraseRoundRect draws the interior of the rounded rectangle bounded by the rectangle that you specify
in the area parameter with the background settings of the current graphics port.
This effectively erases the rounded rectangle. Use the ovalWidth and ovalHeight
parameters to specify the diameters of curvature for the corners of the rounded rectangle.
This procedure leaves the location of the graphics pen unchanged.
QuickDraw::EraseRoundRect()
- Parameters:
- area - The rectangle that defines the rounded rectangle’s boundaries.
- ovalWidth - The width of the oval defining the rounded corner.
- ovalHeight - The height of the oval defining the rounded corner.
invertRoundRect
public void invertRoundRect(QDRect area,
int ovalWidth,
int ovalHeight) throws QDException
- The InvertRoundRect procedure inverts the pixels enclosed by the rounded rectangle bounded by the rectangle
that you specify in the area parameter. Every white pixel becomes black and every black pixel becomes white.
The ovalWidth and ovalHeight parameters specify the diameters of curvature for the corners.
The pen location does not change.
QuickDraw::InvertRoundRect()
- Parameters:
- area - The rectangle that defines the rounded rectangle’s boundaries.
- ovalWidth - The width of the oval defining the rounded corner.
- ovalHeight - The height of the oval defining the rounded corner.
frameOval
public void frameOval(QDRect area) throws QDException
- Using the Pen mode, and size of the graphics pen for the current graphics port,
the FrameOval procedure draws an outline just inside the oval with the bounding rectangle that you
specify in the area parameter. The outline is as wide as the pen width and as tall as the pen height.
The pen location does not change.
If a region is open and being formed, the outside outline of the new oval is mathematically added
to the region’s boundary.
QuickDraw::FrameOval()
- Parameters:
- area - The rectangle that defines the oval’s boundary.
paintOval
public void paintOval(QDRect area) throws QDException
- Using the pen mode for the current graphics port,
the PaintOval procedure draws the interior of an oval just inside the bounding rectangle
that you specify in the area parameter. The pen location does not change.
QuickDraw::PaintOval()
- Parameters:
- area - The rectangle that defines the oval’s boundary.
eraseOval
public void eraseOval(QDRect area) throws QDException
- Using the background pattern for the current graphics port and the patCopy pattern mode,
the EraseOval procedure draws the interior of an oval just inside the bounding rectangle that
you specify in the area parameter. This effectively erases the oval bounded by the specified rectangle.
This procedure leaves the location of the graphics pen unchanged.
QuickDraw::EraseOval()
- Parameters:
- area - The rectangle that defines the oval’s boundary.
invertOval
public void invertOval(QDRect area) throws QDException
- The InvertOval procedure inverts the pixels enclosed by an oval just inside
the bounding rectangle that you specify in the area parameter.
Every white pixel becomes black and every black pixel becomes white.
The pen location does not change.
QuickDraw::InvertOval()
- Parameters:
- area - The rectangle that defines the oval’s boundary.
framePoly
public void framePoly(Polygon poly) throws QDException
- Using the current graphics port’s pen size,
FramePoly plays back the line-drawing commands that define
the polygon passed in the poly parameter.
The graphics pen hangs below and to the right of each point on the boundary of the polygon.
Thus, the drawn polygon extends beyond the right and bottom edges of the polygon’s bounding rectangle
(which is stored in the polyBBox field of the Polygon record) by the pen width and pen height,
respectively. All other graphics operations, such as painting a polygon with the PaintPoly procedure,
occur strictly within the boundary of the polygon, as illustrated in Figure 3-22(Im).
QuickDraw::FramePoly()
- Parameters:
- poly - Polygon to frame.
paintPoly
public void paintPoly(Polygon poly) throws QDException
- Using the pen pattern and pattern mode for the current graphics port,
PaintPoly draws the interior of a polygon
passed in the poly parameter. The pen location does not change.
QuickDraw::PaintPoly()
- Parameters:
- poly - Polygon to paint.
erasePoly
public void erasePoly(Polygon poly) throws QDException
- Using the patCopy pattern mode, ErasePoly draws the
interior of the polygon passed in the poly parameter
with the background pattern for the current graphics port.
QuickDraw::ErasePoly()
- Parameters:
- poly - Polygon to erase.
invertPoly
public void invertPoly(Polygon poly) throws QDException
- invertPoly inverts the pixels enclosed by the polygon passed in the poly parameter.
Every white pixel becomes black and every black pixel becomes white.
This procedure leaves the location of the graphics pen unchanged.
QuickDraw::InvertPoly()
- Parameters:
- poly - Polygon to erase.
frameRect
public void frameRect(QDRect area) throws QDException
- Using the pen size of the graphics pen for the current graphics port,
the FrameRect procedure draws an outline just inside the rectangle that you specify in the area parameter.
The outline is as wide as the pen width and as tall as the pen height. The pen location does not change.
QuickDraw::FrameRect()
- Parameters:
- area - the portion of the QDGraphic port to frame
or null for entire bounds
eraseRect
public void eraseRect(QDRect area) throws QDException
- Erases the specified rect with the current back color.
QuickDraw::EraseRect()
- Parameters:
- area - the portion of the QDGraphic port to erase
or null for entire bounds
eraseRgn
public void eraseRgn(Region area) throws QDException
- Erases the specified region with the current back color.
QuickDraw::EraseRgn()
- Parameters:
- area - the portion of the QDGraphic to erase
getCPixel
public QDColor getCPixel(int h,
int v) throws QDException
- Returns the RGB color for the pixel at the location you
specify in the h and v parameters.
QuickDraw::GetCPixel()
- Parameters:
- h - The horizontal coordinate of the point at the upper-left corner of the pixel.
- v - The vertical coordinate of the point at the upper-left corner of the pixel.
- Returns:
- The QDColor for the pixel.
setCPixel
public void setCPixel(int h,
int v,
QDColor cPix) throws QDException
- For the pixel at the location you specify in the h and v parameters,
the setCPixel procedure sets a pixel value that most closely matches
the RGB color that you specify in the cPix parameter.
On an indexed color system, the SetCPixel procedure sets the pixel
value to the index of the best-matching color in the current device’s CLUT.
In a direct environment, the SetCPixel procedure sets the pixel value to a
16-bit or 32-bit direct pixel value.
QuickDraw::SetCPixel()
- Parameters:
- h - The horizontal coordinate of the point at the upper-left corner of the pixel.
- v - The vertical coordinate of the point at the upper-left corner of the pixel.
penSize
public void penSize(int width,
int height) throws QDException
- The PenSize procedure sets the width that you specify in
the width parameter and the height that you specify in
the height parameter for the graphics pen in the current graphics port.
All subsequent calls to the Line and LineTo procedures and to the
procedures that draw framed shapes in the current graphics port
use the new pen dimensions.
QuickDraw::PenSize()
- Parameters:
- width - The pen width, as an integer from 0 to 32,767. If you set the value to 0, the pen does not draw. Values less than 0 are undefined.
- height - The pen height, as an integer from 0 to 32,767. If you set the value to 0, the pen does not draw. Values less than 0 are undefined.
penNormal
public void penNormal() throws QDException
- The PenNormal procedure restores the size, of the graphics pen
in the current graphics port to their initial values:
a size of 1 pixel by 1 pixel. The pen location does not change.
QuickDraw::PenNormal()
getForeColor
public QDColor getForeColor()
- Returns the current foreground color of the
QDGraphic.
QuickDraw::GetForeColor()
- Returns:
- QDColor
setForeColor
public void setForeColor(QDColor fColor)
- Sets the current foreground color of the QDGraphics.
QuickDraw::RGBForeColor()
- Parameters:
- fColor - QDColor
paintRect
public void paintRect(QDRect area) throws QDException
- Paints the specified rect with the current foreground color.
QuickDraw::PaintRect()
- Parameters:
- area - the portion of the QDGraphic port to paint
or null for entire bounds
lineTo
public void lineTo(int h,
int v) throws QDException
- The LineTo procedure draws a line from the graphics pen’s current location
in the current graphics port to the new location (h,v), which you specify in the
local coordinates of the current graphics port. If you are using LineTo to
draw a region or polygon, its outline is infinitely thin and is not affected
by the values of the pnSize, pnMode, or pnPat field of the graphics port.
QuickDraw::LineTo()
QuickDraw::MacLineTo()
- Parameters:
- h - The horizontal coordinate of the graphics pen’s new location.
- v - The vertical coordinate of the graphics pen’s new location.
line
public void line(int h,
int v) throws QDException
- Starting at the current location of the graphics pen, the Line procedure
draws a line the horizontal distance that you specify in the h
parameter and the vertical distance that you specify in the v parameter.
QuickDraw::Line()
- Parameters:
- h - The horizontal distance of the graphics pen’s movement.
- v - The vertical distance of the graphics pen’s movement.
moveTo
public void moveTo(int h,
int v) throws QDException
- The MoveTo procedure changes the graphics pen’s current location to
the new horizontal coordinate you specify in the h parameter and
the new vertical coordinate you specify in the v parameter.
Specify the new location in the local coordinates of the current graphics port.
The MoveTo procedure performs no drawing.
QuickDraw::MoveTo()
- Parameters:
- h - The horizontal distance of the graphics pen’s movement.
- v - The vertical distance of the graphics pen’s movement.
move
public void move(int h,
int v) throws QDException
- The Move procedure moves the graphics pen from its current location
in the current graphics port a horizontal distance that you specify
in the h parameter and a vertical distance that you specify in the
v parameter.
QuickDraw::Move()
- Parameters:
- h - The horizontal distance of the graphics pen’s movement.
- v - The vertical distance of the graphics pen’s movement.
paintRgn
public void paintRgn(Region area) throws QDException
- Paints the specified region with the current foreground color.
QuickDraw::PaintRgn()
QuickDraw::MacPaintRgn()
- Parameters:
- area - the portion of the QDGraphic port to paint
frameRgn
public void frameRgn(Region area) throws QDException
- Draws an outline just inside the region you pass in the area parameter.
The outline never goes outside the region boundary. The pen location does not change.
QuickDraw::FrameRgn()
QuickDraw::MacFrameRgn()
- Parameters:
- area - the portion of the QDGraphic port to paint
toString
public String toString()
- Print information about this object.
- Returns:
- a string representing this QDGraphics object
- Overrides:
- toString in class QTPointerRef
All Packages Class Hierarchy This Package Previous Next Index