public class Graphics
Encapsulates a Win 32 device context (DC) and the drawing operations that are typically performed on a DC. These operations include the drawing of standard shapes, such as pies and arcs, as well as the drawing of Windows controls, such as buttons and check boxes. The Graphics object automatically performs garbage collection, freeing the resources allocated for various drawing objects. In addition, you can call the object's dispose method to enforce the cleanup of these resources. A Graphics object that is connected to a Windows control is valid only as long as that control continues to process its messages. For example, if a control processes its onPaint message, the Graphics object that is passed as a parameter to onPaint is valid only until onPaint returns.
Constructors
Name | Description |
---|---|
Graphics(int dc) | The class constructor. |
Graphics(int dc, int hWnd, Brush brush, Font font, Color textColor, Color backColor) | This constructor makes it possible for a Control object to construct a Graphics object and to initialize the object with the contol's device context, font, brush, and color values. |
Methods
Name | Description |
---|---|
clearClipRect() | Clears the clip rectangle |
clearRect(Rectangle rect) | Clears the specified rectangle by filling with the background color for the Grapics object. |
clearRect(int x, int y, int width, int height) | Clears the specified rectangle by filling it with the background color for the Graphics object. |
dispose() | Disposes of this Graphics object, freeing all resources allocated internally by the object. |
drawAngleArc(Point center, int radius, float startAngle, float endAngle) | Draws a line segment and an arc. |
drawAngleArc(int centerX, int centerY, int radius, float startAngle, float endAngle) | Draws a line segment and an arc. |
drawAngleArc(Point center, int radius, float startAngle, float endAngle, RasterOp op) | Draws a line segment and an arc, and then applies a raster operation to the drawing. |
drawAngleArc(int centerX, int centerY, int radius, float startAngle, float endAngle, RasterOp op) | Draws a line segment and an arc, and applies a raster operation to the drawing. |
drawArc(Rectangle rect, Point start, Point end) | Draws an elliptical arc in the specified bounding rectangle. |
drawArc(Rectangle rect, Point start, Point end, RasterOp op) | Draws an elliptical arc in the specified bounding rectangle, and applies a raster operation to the drawing. |
drawArc(int x, int y, int width, int height, int startX, int startY, int endX, int endY) | Draws an elliptical arc. |
drawArc(int x, int y, int width, int height, int startX, int startY, int endX, int endY, RasterOp op) | Draws an elliptical arc, and applies a raster operation to the drawing. |
drawBezier(Point [] points) | Draws one or more cubic B&#-23;zier curves by using the endpoints and control points specified by the array of Point objects. |
drawBezier(Point [] points, RasterOp op) | Draws one or more cubic B&#-23;zier curves by using the endpoints and control points specified by the array of Point objects. |
drawBorder3D(Rectangle rect) | Draws a three-dimensional style border around the specified rectangle, using the default three-dimensional style of Border3DStyle.ETCHED. |
drawBorder3D(Rectangle rect, int style) | Draws a three-dimensional style border around a rectangle, using the specified style. |
drawBorder3D(Rectangle rect, int style, int sides) | Draws a three-dimensional style border around the specified rectangle. |
drawBorder3D(int x, int y, int width, int height) | Draws a three-dimensional style border around a rectangle, using the default three-dimensional style of Border3DStyle.ETCHED. |
drawBorder3D(int x, int y, int width, int height, int style) | Draws a three-dimensional style border around a rectangle, using a specified style. |
drawBorder3D(int x, int y, int width, int height, int style, int sides) | Draws a three-dimensional style border around the specified rectangle. |
drawButton(Rectangle rect, int state) | Draws a button control in the specified rectangle. |
drawButton(int x, int y, int width, int height, int state) | Draws a Win32 button control in the specified rectangle. |
drawCaptionButton(Rectangle rect, int button, int state) | Draws a Win32 window caption button in the specified rectangle. |
drawCaptionButton(int x, int y, int width, int height, int button, int state) | Draws a Win32 window caption button in the specified rectangle. |
drawCheckBox(Rectangle rect, int state) | Draws a Win32 checkbox control in the specified rectangle. |
drawCheckBox(int x, int y, int width, int height, int state) | Draws a Win32 checkbox control in the specified rectangle. |
drawChord(Rectangle rect, Point start, Point end) | Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). |
drawChord(Rectangle rect, Point start, Point end, RasterOp op) | Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"), and applies a raster operation to the drawing. |
drawChord(int x, int y, int width, int height, int startX, int startY, int endX, int endY) | Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). |
drawChord(int x, int y, int width, int height, int startX, int startY, int endX, int endY, RasterOp op) | Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). |
drawComboButton(Rectangle rect, int state) | Draws the drop-down button of a Win32 combo box in the specified rectangle. |
drawComboButton(int x, int y, int width, int height, int state) | Draws the drop-down button of a Win32 combo box in the specified rectangle. |
drawDragRect(Rectangle lpRect, Point size, Rectangle lpRectLast, Point sizeLast, Brush pBrush, Brush pBrushLast) |
drawEllipsepublic final void drawEllipse(Rectangle rect); |
drawEllipse(Rectangle rect) | Draws an ellipse in the specified bounding box. |
drawEllipse(int x, int y, int width, int height) | Draws an ellipse inside the specified bounding box, and applies a raster operation to the drawing. |
drawEllipse(Rectangle rect, RasterOp op) | Draws an ellipse inside the specified bounding box, and applies the specified raster operation to the drawing. |
drawEllipse(int x, int y, int width, int height, RasterOp op) | Draws a Windows "focus rectangle," which is a dotted rectangle that Windows uses to indicate that a specified control has the focus. |
drawFocusRect(Rectangle r) | Draws a Windows "focus rectangle," which is a dotted rectangle that Windows uses to indicate that a specified control has the focus. |
drawFocusRect(int x, int y, int width, int height) | Draws an image at the specified point. |
drawImage(Image i, Point pt) | Draws the specified image at the specified point. |
drawImage(Image i, int x, int y) | Draws an image at the specified point, and applies a raster to the drawing. |
drawImage(Image i, Point pt, RasterOp op) | Draws an image at the specified point, and applies raster operation to the drawing. |
drawImage(Image i, int x, int y, RasterOp op) | Draws an image in the specified rectangle. |
drawImage(Image i, Rectangle r, boolean scale) | Draws the specified image in the specified rectangle. |
drawImage(Image i, int x, int y, int width, int height, boolean scale) | Draws an image in the specified rectangle. |
drawImage(Image i, Rectangle r, RasterOp op, boolean scale) | Draws an image in the specified rectangle. |
drawImage(Image i, int x, int y, int width, int height, RasterOp op, boolean scale) | Draws a line between two points, using the current pen. |
drawLine(Point p1, Point p2) | Draws a line from the first set of points to the second, using the current pen. |
drawLine(int x1, int y1, int x2, int y2) | Draws a line from the first point to the second using the current pen, and applies a raster operation to the drawing. |
drawLine(Point p1, Point p2, RasterOp op) | Draws a line from the first set of points to the second using the current pen, and applies raster operation to the drawing. |
drawLine(int x1, int y1, int x2, int y2, RasterOp op) | Draws a series of connected lines based on an array of points. |
drawLines(Point [] points) | Draws a series of connected lines based on an array of points, and applies a raster operation to the drawing. |
drawLines(Point [] points, RasterOp op) | Draws a line from the current mouse position to the specified position. |
drawLineTo(Point p) | Draws a line from the current mouse position to the specified position. |
drawLineTo(int x, int y) | Draws a line from the current mouse position to the specified position, and applies a raster operation to the drawing. |
drawLineTo(Point p, RasterOp op) | Draws a line from the current mouse position to the specified position, and then applies a raster operation to the drawing. |
drawLineTo(int x, int y, RasterOp op) | Draws a menu glyph for a Win32 menu in the specified rectangle. |
drawMenuGlyph(Rectangle rect, int glyph) | Draws a menu glyph for a Win32 menu in the specified rectangle. |
drawMenuGlyph(int x, int y, int width, int height, int glyph) | Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. |
drawPie(Rectangle rect, Point start, Point end) | Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials, and then applies a raster operation to the drawing. |
drawPie(Rectangle rect, Point start, Point end, RasterOp op) | Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. |
drawPie(int x, int y, int width, int height, int startX, int startY, int endX, int endY) | Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials, and then applies a raster operation to the drawing. |
drawPie(int x, int y, int width, int height, int startX, int startY, int endX, int endY, RasterOp op) | Draws a polygon based on a specified array of vertices. |
drawPolygon(Point [] vertices) | Draws a polygon based on a specified array of vertices. |
drawPolygon(Point [] vertices, RasterOp op) | Draws a polygon based on a specified array of vertices. |
drawPolygon(Point [] vertices, RasterOp op, boolean alternate) | Draws a Win32 radio button in the specified rectangle. |
drawRadioButton(Rectangle rect, int state) | Draws a Win32 radio button in the specified rectangle. |
drawRadioButton(int x, int y, int width, int height, int state) | Draws a rectangle using the specified rectangle. |
drawRect(Rectangle rect) | Draws a rectangle using the specified coordinates. |
drawRect(int x, int y, int width, int height) | Draws a rectangle using the specified rectangle. |
drawRect(Rectangle rect, RasterOp op) | Draws a rectangle using the specified coordinates, and then applies a raster operation to the drawing. |
drawRect(int x, int y, int width, int height, RasterOp op) | Draws a rectangle with rounded corners using the current pen and fill brush. |
drawRoundedRect(Rectangle rect, int radius) | Draws a rectangle with rounded corners using the current pen and fill brush. |
drawRoundedRect(Rectangle rect, int radius, RasterOp op) | Draws a rectangle with rounded corners using the current pen and fill brush. |
drawRoundedRect(int x, int y, int width, int height, int radius) | Draws a rectangle with rounded corners, using the current pen and fill brush, and then applies a raster operation to the drawing. |
drawRoundedRect(int x, int y, int width, int height, int radius, RasterOp op) | Draws a button for a Win32 scroll bar. |
drawScrollButton(Rectangle rect, int button, int state) | Draws a button for a Win32 scroll bar. |
drawScrollButton(int x, int y, int width, int height, int button, int state) | Draws a sizing grip at the specified location. |
drawSizeGrip(Rectangle rect) | Draws a sizing grip at the specified location. |
drawSizeGrip(int x, int y, int width, int height) | Draws a string at the specified point. |
drawString(String s, Point p) | Draws a string at the specified point. |
drawString(String s, int x, int y) | Draws and formats a string in the specified bounding rectangle. |
drawString(String s, Rectangle rect, int format) | Draws and formats a string within the specified bounding rectangle. |
drawString(String s, int x, int y, int width, int height, int format) | Draws a string at a point in the specified clipping rectangle. |
drawString(String s, Point p, Rectangle clip) | Draws a string at the specified point in a clipping rectangle. |
drawString(String s, int x, int y, int clipX, int clipY, int clipWidth, int clipHeight) | Draws a string at the specified point using an array of tab stops to determine the tab positions. |
drawString(String s, Point p, int [] tabStops) | Draws a string at the specified point using an array of tab stops to determine the tab positions. |
drawString(String s, int x, int y, int [] tabStops) |
excludeClipRectpublic int excludeClipRect(Rectangle lpRect); |
excludeClipRect(int x1, int y1, int x2, int y2) | Fills an area of the display surface with the current brush. |
excludeClipRect(Rectangle lpRect) | Fills an area of the display surface with the current brush. |
fillBorder(Point start, Color color) | Fills an area of the display surface with the current brush. |
fillBorder(int x, int y, Color color) | Fills an area of the display surface with the current brush. |
fillSurface(Point start, Color color) | Ensures that all resources allocated by the Graphics object have been freed. |
fillSurface(int x, int y, Color color) | Retrieves the current background color for the Graphics object. |
finalize() | Retrieves the current brush for the Graphics object. |
getBackColor() | Retrieves the origin Graphics object's current brush. |
getBrush() | Retrieves the current font for the Graphics object. |
getBrushOrigin() | Retrieves an array of FontDescriptor objects, which contains an entry for each font installed on the system. |
getFont() | Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified character set. |
getFontDescriptors() | Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified face name. |
getFontDescriptors(int charSet) | Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified name and character set. |
getFontDescriptors(String name) | Retrieves the handle to the device context used to construct the Graphics object. |
getFontDescriptors(int charSet, String name) | Retrieves a boolean value that indicates whether the current background setting is opaque. |
getHandle() | Retrieves the current pen for the Graphics object. |
getOpaque() | Retrieves the color of the pixel at the specified point. |
getPen() | Retrieves the color of the pixel at the specified point. |
getPixel(Point pt) | Retrieves the closest solid color that the hardware will use for the specified color. |
getPixel(int x, int y) | Retrieves the current text color for the Graphics object. |
getSolidColor(Color color) | Retrieves the area required to display the specified text using the current font settings. |
getTextColor() | Retrieves the area required to display the specified string, using the current font settings. |
getTextSize(String text) | Retrieves the area required to display the specified text string, using the current font settings. |
getTextSize(String text, int [] tabStops) | Retrieves the amount of extra space to be used between characters when drawing text. |
getTextSize(String text, int width, int format) |
intersectClipRectpublic int intersectClipRect(Rectangle lpRect); |
getTextSpace() | Inverts the pixels in the specified rectangle. |
intersectClipRect(int x1, int y1, int x2, int y2) | Inverts the pixels in the specified rectangle. |
intersectClipRect(Rectangle lpRect) | Scrolls an area of the graphics object. |
invertRect(Rectangle rect) | Sets the background color used to fill empty regions. |
invertRect(int x, int y, int width, int height) | Sets the current brush for the Graphics object. |
scroll(int scrollX, int scrollY, Rectangle scrollArea, Rectangle clipArea) | Sets the brush origin for the Graphics object. |
setBackColor(Color color) | Sets the brush origin for the Graphics object. |
setBrush(Brush brush) | Sets the current font for the Graphics object. |
setBrushOrigin(Point pt) | Sets the background fill mode for this Graphics object. |
setBrushOrigin(int x, int y) | Sets the drawing pen for the Graphics object. |
setFont(Font font) | Sets a pixel to the current foreground (text) color. |
setOpaque(boolean opaque) | Sets a pixel to the current foreground (text) color. |
setPen(Pen pen) | Sets a pixel to the specified color. |
setPixel(Point pt) | Sets a pixel to the specified color. |
setPixel(int x, int y) | Sets a pixel to the specified color, and applies a raster operation to the pixel. |
setPixel(Point pt, Color color) | Sets the color to be used when drawing text. |
setPixel(int x, int y, Color color) | Sets the amount of extra space to be used between characters when drawing text. |
setPixel(int x, int y, Color color, RasterOp op) | |
setTextColor(Color color) | Clears the clip rectangle |
setTextSpace(int space) | Clears the specified rectangle by filling with the background color for the Grapics object. |
The class constructor. The Graphics class constructor initializes a Graphics object based on the specified device context handle.
This constructor makes it possible for a Control object to construct a Graphics object and to initialize the object with the contol's device context, font, brush, and color values. If the device context passed to this constructor is null, the constructor verifies that sufficient resources are available to create a device context and then retrieves the device context based on the specified window handle. Finally, this constructor verifies that sufficient resources are available for the creation of the device context.
Clears the clip rectangle
Clears the specified rectangle by filling with the background color for the Grapics object.
Clears the specified rectangle by filling it with the background color for the Graphics object.
Disposes of this Graphics object, freeing all resources allocated internally by the object. Because the garbage collector automatically performs object cleanup, it is usually unnecessary for you to call this method.
Draws a line segment and an arc. The line segment is drawn from the current position to the beginning of the arc. The arc is drawn along the perimeter of a circle with the specified radius and center. The length of the arc is defined by the specified start and end angles. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees specified in startAngle. Similarly, the ending point is located by measuring counterclockwise from the starting point by the number of degrees specified in endAngle.
Draws a line segment and an arc. The line segment is drawn from the current position to the beginning of the arc. The arc is drawn along the perimeter of a circle with the specified radius and center. The length of the arc is defined by the specified start and end angles. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees specified in the start angle. Similarly, the ending point is located by measuring counterclockwise from the starting point by the number of degrees specified in the end angle.
Draws a line segment and an arc, and then applies a raster operation to the drawing. The line segment is drawn from the current position to the beginning of the arc and is drawn along the perimeter of a circle with the specified radius and center. The length of the arc is defined by the specified start and end angles. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees in startAngle. Similarly, the ending point is located by measuring counterclockwise from the starting point by the number of degrees specified in endAngle.
Draws a line segment and an arc, and applies a raster operation to the drawing. The line segment is drawn from the current position to the beginning of the arc and is drawn along the perimeter of a circle with the specified radius and center. The length of the arc is defined by the specified start and end angles. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees specified in startAngle. Similarly, the ending point is located by measuring counterclockwise from the starting point by the number of degrees specified in endAngle.
Draws an elliptical arc in the specified bounding rectangle. The center of the arc is the center of the specified bounding rectangle. From the center, the arc extends in the current drawing direction to the specified starting point. Next,the arc declines from the center to the specified ending point. If the starting point and ending point are the same, a complete ellipse is drawn. The arc is always drawn counterclockwise.
Draws an elliptical arc in the specified bounding rectangle, and applies a raster operation to the drawing. The center of the arc is the center of the specified bounding rectangle. The arc extends in the current drawing direction from the point at which it intersects the center of the bounding rectangle to the specified starting point. The arc declines from the point at which it intersects the radial at the center of the bounding rectangle to the specified ending point. If the starting point and ending point are the same, a complete ellipse is drawn. The arc is always drawn counterclockwise.
Draws an elliptical arc. The center of the arc is the center of the rectangle whose origin (x, y) and whose size is specified by the width and height arguments. The arc extends in the current drawing direction from the point at which it intersects the center of the rectangle to the specified starting point. The arc declines from the point at which it intersects the radial at the center of the bounding rectangle to the specified ending point. If the starting point and ending point are the same, a complete ellipse is drawn. The arc is always drawn counterclockwise.
Draws an elliptical arc, and applies a raster operation to the drawing. The center of the arc is the center of the rectangle whose origin (x, y) and whose size is specified by the width and height arguments. The arc extends in the current drawing direction from the point at which it intersects the center of the rectangle to the specified starting point. The arc declines from the point at which it intersects the radial at the center of the bounding rectangle to the specified ending point. If the starting point and ending point are the same, a complete ellipse is drawn. The arc is always drawn counterclockwise.
Draws one or more cubic B&#-23;zier curves by using the endpoints and control points specified by the array of Point objects. The first curve is drawn from the first point to the fourth point using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third point is used as the ending point.
Draws one or more cubic B&#-23;zier curves by using the endpoints and control points specified by the array of Point objects. The first curve is drawn from the first point to the fourth point using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third point is used as the ending point.
Draws a three-dimensional style border around the specified rectangle, using the default three-dimensional style of Border3DStyle.ETCHED.
Draws a three-dimensional style border around a rectangle, using the specified style.
Draws a three-dimensional style border around the specified rectangle. You can specify the style of the three-dimensional appearance. You can also identify the sides of the three-dimensional rectangle you want to draw.
Draws a three-dimensional style border around a rectangle, using the default three-dimensional style of Border3DStyle.ETCHED.
Draws a three-dimensional style border around a rectangle, using a specified style.
Draws a three-dimensional style border around the specified rectangle. You can specify the style of the three-dimensional appearance. You can also identify the sides of the three-dimensional rectangle you want to draw.
Draws a button control in the specified rectangle.
Draws a Win32 button control in the specified rectangle.
Draws a Win32 window caption button in the specified rectangle.
Draws a Win32 window caption button in the specified rectangle.
Draws a Win32 checkbox control in the specified rectangle.
Draws a Win32 checkbox control in the specified rectangle.
Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). The chord is outlined using the current pen and filled using the current brush. The curve of the chord is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point at which the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line segment drawn from the center of the ellipse to a specified endpoint on the ellipse.) The chord is closed by drawing a line from the intersection of the first radial and the curve to the intersection of the second radial and the curve.
Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"), and applies a raster operation to the drawing. The chord is outlined using the current pen and filled using the current brush. The curve of the chord is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point at which the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line segment drawn from the center of the ellipse to a specified endpoint on the ellipse.) The chord is closed by drawing a line from the intersection of the first radial and the curve to the intersection of the second radial and the curve.
Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). The chord is outlined using the current pen and filled using the current brush. The curve of the chord is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point at which the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line segment drawn from the center of the ellipse to a specified endpoint on the ellipse.) The chord is closed by drawing a line from the intersection of the first radial and the curve to the intersection of the second radial and the curve.
Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). The chord is outlined using the current pen and filled using the current brush. The curve of the chord is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point at which the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line segment drawn from the center of the ellipse to a specified endpoint on the ellipse.) The chord is closed by drawing a line from the intersection of the first radial and the curve to the intersection of the second radial and the curve.
Draws the drop-down button of a Win32 combo box in the specified rectangle.
Draws the drop-down button of a Win32 combo box in the specified rectangle.
Draws an ellipse in the specified bounding rectangle.
Draws an ellipse in the specified bounding box.
Draws an ellipse inside the specified bounding box, and applies a raster operation to the drawing.
Draws an ellipse inside the specified bounding box, and applies the specified raster operation to the drawing.
Draws a Windows "focus rectangle," which is a dotted rectangle that Windows uses to indicate that a specified control has the focus.
Draws a Windows "focus rectangle," which is a dotted rectangle that Windows uses to indicate that a specified control has the focus.
Draws an image at the specified point.
Draws the specified image at the specified point.
Draws an image at the specified point, and applies a raster to the drawing.
Draws an image at the specified point, and applies raster operation to the drawing.
Draws an image in the specified rectangle. If scale is true, drawImage stretches or shrinks the image to fit the specified rectangle. Otherwise, drawImage crops the image.
Draws the specified image in the specified rectangle. If scale is true, drawImage stretches or shrinks the image to fit the rectangle. Otherwise, drawImage crops the image.
Draws an image in the specified rectangle. If scale is true, drawImage stretches or shrinks the image to fit the rectangle. Otherwise, drawImage crops the image.
Draws an image in the specified rectangle. If scale is true, drawImage stretches or shrinks the image to fit the rectangle. Otherwise, drawImage crops the image.
Draws a line between two points, using the current pen.
Draws a line from the first set of points to the second, using the current pen.
Draws a line from the first point to the second using the current pen, and applies a raster operation to the drawing.
Draws a line from the first set of points to the second using the current pen, and applies raster operation to the drawing.
Draws a series of connected lines based on an array of points.
Draws a series of connected lines based on an array of points, and applies a raster operation to the drawing.
Draws a line from the current mouse position to the specified position.
Draws a line from the current mouse position to the specified position.
Draws a line from the current mouse position to the specified position, and applies a raster operation to the drawing.
Draws a line from the current mouse position to the specified position, and then applies a raster operation to the drawing.
Draws a menu glyph for a Win32 menu in the specified rectangle.
Draws a menu glyph for a Win32 menu in the specified rectangle.
Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined using the current pen and is filled using the current brush. The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line drawn from the center of the ellipse to the specified endpoint on the ellipse.)
Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials, and then applies a raster operation to the drawing. The pie is outlined using the current pen and is filled using the current brush. The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line drawn from the center of the ellipse to the specified endpoint on the ellipse.)
Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined using the current pen and is filled using the current brush. The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line drawn from the center of the ellipse to the specified endpoint on the ellipse.)
Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials, and then applies a raster operation to the drawing. The pie is outlined using the current pen and is filled using the current brush. The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a line drawn from the center of the ellipse to the specified endpoint on the ellipse.)
Draws a polygon based on a specified array of vertices. This array must contain at least two elements. The polygon is drawn using the current pen and brush and is automatically closed.
Draws a polygon based on a specified array of vertices. This array must contain at least two elements. The polygon is drawn using the current pen and brush, and is automatically closed.
Draws a polygon based on a specified array of vertices. This array must contain at least two elements. The polygon is automatically closed.
Draws a Win32 radio button in the specified rectangle.
Draws a Win32 radio button in the specified rectangle.
Draws a rectangle using the specified rectangle. The rectangle filled using the current brush, and the current pen is used to draw the rectangle's edge.
Draws a rectangle using the specified coordinates. The rectangle filled using the current brush, and the current pen is used to draw the rectangle's edge.
Draws a rectangle using the specified rectangle. The rectangle is filled using the current brush, and the current pen is used to draw the rectangle's edge.
Draws a rectangle using the specified coordinates, and then applies a raster operation to the drawing. The rectangle is filled using the current brush, and the current pen is used to draw the rectangle's edge.
Draws a rectangle with rounded corners using the current pen and fill brush.
Draws a rectangle with rounded corners using the current pen and fill brush.
Draws a rectangle with rounded corners using the current pen and fill brush.
Draws a rectangle with rounded corners, using the current pen and fill brush, and then applies a raster operation to the drawing.
Draws a button for a Win32 scroll bar.
Draws a button for a Win32 scroll bar.
Draws a sizing grip at the specified location. A sizing grip is usually located at the lower right corner of a window.
Draws a sizing grip at the specified location. A sizing grip is usually located at the lower-right corner of a window.
Draws a string at the specified point.
Draws a string at the specified point.
Draws and formats a string in the specified bounding rectangle.
Draws and formats a string within the specified bounding rectangle.
Draws a string at a point in the specified clipping rectangle.
Draws a string at the specified point in a clipping rectangle.
Draws a string at the specified point using an array of tab stops to determine the tab positions.
Draws a string at the specified point using an array of tab stops to determine the tab positions.
Fills an area of the display surface with the current brush. Windows assumes that the area to be filled is completely bounded by the color specified by the "color" parameter. The function begins filling at the point specified and continues in all directions until it reaches the boundary.
Fills an area of the display surface with the current brush. Windows assumes that the area to be filled is completely bounded by the color specified by the color parameter. The function begins filling at the point specified and continues in all directions until it reaches the boundary.
Fills an area of the display surface with the current brush. Windows assumes that the area to be filled is a single color. The fillSurface method begins to fill the area at the point specified and continues in all directions, filling all adjacent regions containing the specified color. The starting point must already be filled with the color specified in the color parameter.
Fills an area of the display surface with the current brush. Windows assumes that the area to be filled is a single color. The fillSurface method begins to fill the area at the point specified and continues in all directions, filling all adjacent regions containing the specified color. The starting point must already be filled with the color specified in the color parameter.
Ensures that all resources allocated by the Graphics object have been freed.
Returns the current background color.
Retrieves the current background color for the Graphics object.
Returns the current brush if one is set; otherwise, returns null.
Retrieves the current brush for the Graphics object.
Returns the current brush origin.
Retrieves the origin Graphics object's current brush.
Returns the current font.
Retrieves the current font for the Graphics object.
Returns an array of FontDescriptor objects.
Retrieves an array of FontDescriptor objects, which contains an entry for each font installed on the system.
Returns an array of FontDescriptor objects.
Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified character set.
Returns an array of FontDescriptor objects.
Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified face name.
Returns an array of FontDescriptor objects.
Retrieves an array of FontDescriptor objects, which contains an entry for each font that matches the specified name and character set.
Returns the handle to the device context (HDC).
Retrieves the handle to the device context used to construct the Graphics object.
Returns true if the background color should be used as a fill before drawing; otherwise, returns false.
Retrieves a boolean value that indicates whether the current background setting is opaque.
Returns the current pen, if a pen is set; Otherwise, returns null.
Retrieves the current pen for the Graphics object.
Returns the color of the pixel.
Retrieves the color of the pixel at the specified point.
Returns the color of the pixel.
Retrieves the color of the pixel at the specified point.
Returns the color that will be used to draw.
Retrieves the closest solid color that the hardware will use for the specified color.
Returns the text color for the Graphics object.
Retrieves the current text color for the Graphics object.
Returns a Point with the width and height of the text.
Retrieves the area required to display the specified text using the current font settings.
Returns a point with the width and height of the text.
Retrieves the area required to display the specified string, using the current font settings.
Returns a point that specifies the width and height of the text on the Graphics object.
Retrieves the area required to display the specified text string, using the current font settings.
Returns an integer that specifies the amount of extra space.
Retrieves the amount of extra space to be used between characters when drawing text.
Inverts the pixels in the specified rectangle.
Inverts the pixels in the specified rectangle.
Scrolls an area of the graphics object.
Sets the background color used to fill empty regions.
Sets the current brush for the Graphics object.
Sets the brush origin for the Graphics object.
Sets the brush origin for the Graphics object.
Sets the current font for the Graphics object.
Sets the background fill mode for this Graphics object.
Sets the drawing pen for the Graphics object.
Sets a pixel to the current foreground (text) color.
Sets a pixel to the current foreground (text) color.
Sets a pixel to the specified color.
Sets a pixel to the specified color.
Sets a pixel to the specified color, and applies a raster operation to the pixel.
Sets the color to be used when drawing text.
Sets the amount of extra space to be used between characters when drawing text.