Graphics Class

Summary: Represents the graphics according to the graphics engine used in the current assembly.

Module: aspose.imaging

Full Name: aspose.imaging.Graphics

Aspose.Imaging Version: 24.5.0

Constructors

NameDescription
Graphics(source_image)Initializes a new instance of the Graphics class.

Properties

NameTypeAccessDescription
clipRegionr/wGets or sets the clip region.
compositing_qualityCompositingQualityr/wGets or sets the compositing quality.
dpi_xfloatrGets the horizontal resolution of this Aspose.Imaging.Graphics.
dpi_yfloatrGets the vertical resolution of this Aspose.Imaging.Graphics.
imageImagerGets the image.
interpolation_modeInterpolationModer/wGets or sets the interpolation mode.
is_in_begin_update_callboolrGets a value indicating whether graphics is in BeginUpdate call state.
page_scalefloatr/wGets or sets the scaling between world units and page units for this Aspose.Imaging.Graphics.
page_unitGraphicsUnitr/wGets or sets the unit of measure used for page coordinates in this Aspose.Imaging.Graphics.
paintable_image_optionsImageOptionsBaser/wGets or sets image options, used to create paintable vactor images to draw.
smoothing_modeSmoothingModer/wGets or sets the smoothing mode.
text_rendering_hintTextRenderingHintr/wGets or sets the text rendering hint.
transformMatrixr/wGets or sets a copy of the geometric world transformation for this Graphics.

Methods

NameDescription
begin_update()Starts caching of the following graphics operations. The graphics effects applied afterwards will not be applied immediately instead the EndUpdate will cause applying all the effects at once.
clear(color)Clears the graphics surface using the specified color.
draw_arc(pen, rect, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
draw_arc(pen, rect, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
draw_arc(pen, x, y, width, height, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
draw_arc(pen, x, y, width, height, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
draw_arc_in_rect(pen, rect, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
draw_arc_in_rect_f(pen, rect, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
draw_arc_xy(pen, x, y, width, height, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
draw_arc_xyf(pen, x, y, width, height, start_angle, sweep_angle)Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
draw_bezier(pen, pt1, pt2, pt3, pt4)Draws a Bézier spline defined by four PointF structures.
draw_bezier(pen, pt1, pt2, pt3, pt4)Draws a Bézier spline defined by four PointF structures.
draw_bezier(pen, x1, y1, x2, y2, x3, y3, x4, y4)Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
draw_bezier_by_points(pen, pt1, pt2, pt3, pt4)Draws a Bézier spline defined by four PointF structures.
draw_bezier_by_points_f(pen, pt1, pt2, pt3, pt4)Draws a Bézier spline defined by four PointF structures.
draw_beziers(pen, points)Draws a series of Bézier splines from an array of Point structures.
draw_beziers(pen, points)Draws a series of Bézier splines from an array of Point structures.
draw_beziers_by_pt_array(pen, points)Draws a series of Bézier splines from an array of Point structures.
draw_beziers_by_pt_array_f(pen, points)Draws a series of Bézier splines from an array of PointF structures.
draw_closed_curve(pen, points)Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
draw_closed_curve(pen, points)Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
draw_closed_curve(pen, points, tension)Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.
draw_closed_curve(pen, points, tension)Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.
draw_closed_curve_by_points(pen, points)Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
draw_closed_curve_by_points_f(pen, points)Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
draw_closed_curve_by_points_f_tension(pen, points, tension)Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.
draw_closed_curve_by_points_tension(pen, points, tension)Draws a closed cardinal spline defined by an array of Point structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.
draw_curve(pen, points)Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.
draw_curve(pen, points)Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.
draw_curve(pen, points, offset, number_of_segments)Draws a cardinal spline through a specified array of PointF structures. The drawing begins offset from the beginning of the array.
This method uses a default tension of 0.5.
draw_curve(pen, points, offset, number_of_segments, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.
draw_curve(pen, points, offset, number_of_segments, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.
draw_curve(pen, points, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension.
draw_curve(pen, points, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension.
draw_curve_by_point_fs(pen, points)Draws a cardinal spline through a specified array of Point structures.
draw_curve_by_point_fs_tension(pen, points, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension.
draw_curve_by_points(pen, points)Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.
draw_curve_by_points_f_offs_num_segm_tension(pen, points, offset, number_of_segments, tension)Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.
draw_curve_by_points_offs_num_segm_tension(pen, points, offset, number_of_segments, tension)Draws a cardinal spline through a specified array of Point structures using a specified tension.
draw_curve_by_points_tension(pen, points, tension)Draws a cardinal spline through a specified array of Point structures using a specified tension.
draw_ellipse(pen, rect)Draws an ellipse defined by a bounding RectangleF.
draw_ellipse(pen, rect)Draws an ellipse defined by a bounding RectangleF.
draw_ellipse(pen, x, y, width, height)Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
draw_ellipse(pen, x, y, width, height)Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
draw_ellipse_by_xy(pen, x, y, width, height)Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
draw_ellipse_by_xyf(pen, x, y, width, height)Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
draw_ellipse_f(pen, rect)Draws an ellipse defined by a bounding RectangleF.
draw_image(image, dest_points)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect, src_unit)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect, src_unit)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect, src_unit, image_attributes)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(image, dest_points, src_rect, src_unit, image_attributes)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image(source_image, point)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image(source_image, point)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image(source_image, rect)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_source, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_source, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, x, y)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image(source_image, x, y)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image(source_image, x, y, width, height)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image(source_image, x, y, width, height)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_at_point(source_image, point)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image_at_point_f(source_image, point)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image_at_xy(source_image, x, y)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image_at_xyf(source_image, x, y)Draws the specified Graphics.image, using its original physical size, at the specified location.
draw_image_dest_point_f_src_rect_f_with_unit(image, dest_points, src_rect, src_unit)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_point_f_src_rect_f_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_points_f_src_rect_f(image, dest_points, src_rect)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_points_src_rect(image, dest_points, src_rect)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_points_src_rect_with_unit(image, dest_points, src_rect, src_unit)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_points_src_rect_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_dest_rect_f_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_dest_rect_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_in_rect(source_image, x, y, width, height)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_in_rect_f(source_image, x, y, width, height)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_in_rectangle(source_image, rect)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_points(image, dest_points)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_points_f(image, dest_points)Draws the specified portion of the specified image at the specified location and with the specified size.
draw_image_rectangle_f(source_image, rect)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_src_dest_rects_f_with_unit(source_image, rect_source, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_src_dest_rects_with_unit(source_image, rect_source, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_src_dst_rect_f_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_src_dst_rects_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_to_rect_f_with_unit(source_image, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_to_rect_with_unit(source_image, rect_destination, graphics_unit)Draws the specified Graphics.image at the specified location and with the specified size.
draw_image_unscaled(source_image, point)Draws a specified image using its original physical size at a specified location.
draw_image_unscaled(source_image, rect)Draws a specified image using its original physical size at a specified location.
draw_image_unscaled(source_image, x, y)Draws the specified image using its original physical size at the location specified by a coordinate pair.
draw_image_unscaled(source_image, x, y, width, height)Draws a specified image using its original physical size at a specified location.
draw_image_unscaled_and_clipped(source_image, rect)Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
draw_image_unscaled_in_rectangle(source_image, rect)Draws a specified image using its original physical size at a specified location.
draw_image_unscaled_to_point(source_image, point)Draws a specified image using its original physical size at a specified location.
draw_line(pen, point1, point2)Draws a line connecting two Point structures.
draw_line(pen, point1, point2)Draws a line connecting two Point structures.
draw_line(pen, x1, y1, x2, y2)Draws a line connecting the two points specified by the coordinate pairs.
draw_line(pen, x1, y1, x2, y2)Draws a line connecting the two points specified by the coordinate pairs.
draw_line_by_xy(pen, x1, y1, x2, y2)Draws a line connecting the two points specified by the coordinate pairs.
draw_line_f_by_xy(pen, x1, y1, x2, y2)Draws a line connecting the two points specified by the coordinate pairs.
draw_line_point_f(pen, point1, point2)Draws a line connecting two PointF structures.
draw_lines(pen, points)Draws a series of line segments that connect an array of Point structures.
draw_lines(pen, points)Draws a series of line segments that connect an array of Point structures.
draw_lines_f(pen, points)Draws a series of line segments that connect an array of PointF structures.
draw_path(pen, path)Draws a GraphicsPath.
draw_pie(pen, rect, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
draw_pie(pen, rect, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
draw_pie(pen, x, y, width, height, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
draw_pie(pen, x, y, width, height, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
draw_pie_in_rect(pen, rect, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
draw_pie_in_rect_f(pen, rect, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
draw_pie_xy(pen, x, y, width, height, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
draw_pie_xyf(pen, x, y, width, height, start_angle, sweep_angle)Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
draw_polygon(pen, points)Draws a polygon defined by an array of PointF structures.
draw_polygon(pen, points)Draws a polygon defined by an array of PointF structures.
draw_polygon_f(pen, points)Draws a polygon defined by an array of PointF structures.
draw_rect(pen, x, y, width, height)Draws a rectangle specified by a coordinate pair, a width, and a height.
draw_rect_f(pen, x, y, width, height)Draws a rectangle specified by a coordinate pair, a width, and a height.
draw_rectangle(pen, rect)Draws a rectangle specified by a RectangleF structure.
draw_rectangle(pen, rect)Draws a rectangle specified by a RectangleF structure.
draw_rectangle(pen, x, y, width, height)Draws a rectangle specified by a coordinate pair, a width, and a height.
draw_rectangle(pen, x, y, width, height)Draws a rectangle specified by a coordinate pair, a width, and a height.
draw_rectangle_f(pen, rect)Draws a rectangle specified by a RectangleF structure.
draw_rectangles(pen, rects)Draws a series of rectangles specified by RectangleF structures.
draw_rectangles(pen, rects)Draws a series of rectangles specified by RectangleF structures.
draw_rectangles_f(pen, rects)Draws a series of rectangles specified by RectangleF structures.
draw_string(s, font, brush, layout_rectangle)Draws the specified text string in the specified rectangle with the specified Brush and Font objects.
draw_string(s, font, brush, layout_rectangle, format)Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
draw_string(s, font, brush, point)Draws the specified text string at the specified location with the specified Brush and Font objects.
draw_string(s, font, brush, point, format)Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
draw_string(s, font, brush, x, y)Draws the specified text string at the specified location with the specified Brush and Font objects.
draw_string(s, font, brush, x, y, format)Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
draw_string_at_point_f(s, font, brush, point)Draws the specified text string at the specified location with the specified Brush and Font objects.
draw_string_at_point_f_format(s, font, brush, point, format)Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
draw_string_at_xy(s, font, brush, x, y)Draws the specified text string at the specified location with the specified Brush and Font objects.
draw_string_in_rect(s, font, brush, layout_rectangle)Draws the specified text string in the specified rectangle with the specified Brush and Font objects.
draw_string_in_rect_f(s, font, brush, layout_rectangle, format)Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
end_update()Finishes caching of the graphics operations started after BeginUpdate was called. The preceding graphics operations will be applied at once when calling this method.
fill_closed_curve(brush, points)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
fill_closed_curve(brush, points)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
fill_closed_curve(brush, points, fillmode)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode. This method uses a default tension of 0.5.
fill_closed_curve(brush, points, fillmode)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode. This method uses a default tension of 0.5.
fill_closed_curve(brush, points, fillmode, tension)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.
fill_closed_curve(brush, points, fillmode, tension)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.
fill_closed_curve_by_point(brush, points)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
fill_closed_curve_by_point_f(brush, points)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.
fill_closed_curve_by_point_f_fill_mode(brush, points, fillmode)
fill_closed_curve_by_point_f_fill_mode_tension(brush, points, fillmode, tension)Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.
fill_closed_curve_by_point_fill_mode(brush, points, fillmode)Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode. This method uses a default tension of 0.5.
fill_closed_curve_by_point_fill_mode_tension(brush, points, fillmode, tension)Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.
fill_ellipse(brush, rect)Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
fill_ellipse(brush, rect)Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
fill_ellipse(brush, x, y, width, height)Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
fill_ellipse(brush, x, y, width, height)Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
fill_ellipse_at_xywh(brush, x, y, width, height)Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
fill_ellipse_at_xywhf(brush, x, y, width, height)Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
fill_ellipse_in_rect(brush, rect)Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
fill_ellipse_in_rect_f(brush, rect)Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
fill_path(brush, path)Fills the interior of a GraphicsPath.
fill_pie(brush, rect, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
fill_pie(brush, rect, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
fill_pie(brush, x, y, width, height, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
fill_pie(brush, x, y, width, height, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
fill_pie_at_xy(brush, x, y, width, height, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
fill_pie_at_xyf(brush, x, y, width, height, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
fill_pie_in_rect(brush, rect, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
fill_pie_in_rect_f(brush, rect, start_angle, sweep_angle)Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
fill_polygon(brush, points)Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.
fill_polygon(brush, points)Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.
fill_polygon(brush, points, fill_mode)Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.
fill_polygon(brush, points, fill_mode)Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.
fill_polygon_by_point(brush, points)Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.
fill_polygon_by_point_f(brush, points)Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.
fill_polygon_by_point_f_fill_mode(brush, points, fill_mode)Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.
fill_polygon_by_point_fill_mode(brush, points, fill_mode)Fills the interior of a polygon defined by an array of points specified by Point structures using the specified fill mode.
fill_rectangle(brush, rect)Fills the interior of a rectangle specified by a Rectangle structure.
fill_rectangle(brush, rect)Fills the interior of a rectangle specified by a Rectangle structure.
fill_rectangle(brush, x, y, width, height)Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
fill_rectangle(brush, x, y, width, height)Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
fill_rectangle_f(brush, rect)Fills the interior of a rectangle specified by a RectangleF structure.
fill_rectangle_f_with_brush(brush, x, y, width, height)Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
fill_rectangle_with_brush(brush, x, y, width, height)Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
fill_rectangles(brush, rects)Fills the interiors of a series of rectangles specified by Rectangle structures.
fill_rectangles(brush, rects)Fills the interiors of a series of rectangles specified by Rectangle structures.
fill_rectangles_f(brush, rects)Fills the interiors of a series of rectangles specified by RectangleF structures.
fill_region(brush, region)Fills the interior of a Region.
measure_string(text, font, layout_area, string_format)Measures the specified text string with specified parameters
multiply_transform(matrix)Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix by prepending the specified Matrix.
multiply_transform(matrix, order)Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix in the specified order.
reset_transform()Resets the Graphics.transform property to identity.
rotate_transform(angle)Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
rotate_transform(angle, order)Rotates the local geometric transform by the specified amount in the specified order.
scale_transform(sx, sy)Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
scale_transform(sx, sy, order)Scales the local geometric transform by the specified amounts in the specified order.
translate_transform(dx, dy)Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
translate_transform(dx, dy, order)Translates the local geometric transform by the specified dimensions in the specified order.

Constructor: Graphics(source_image)

 Graphics(source_image) 

Initializes a new instance of the Graphics class.

Parameters:

ParameterTypeDescription
source_imageImageThe source image.

Method: clear(color)

 clear(color) 

Clears the graphics surface using the specified color.

Parameters:

ParameterTypeDescription
colorColorThe color to clear the graphics surface by.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Example # 2: This examples make use of GraphicsPath and Graphics classes to create and man…

Method: draw_arc(pen, rect, start_angle, sweep_angle)

 draw_arc(pen, rect, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_arc(pen, rect, start_angle, sweep_angle)

 draw_arc(pen, rect, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleRectangleF structure that defines the boundaries of the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_arc(pen, x, y, width, height, start_angle, sweep_angle)

 draw_arc(pen, x, y, width, height, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xfloatThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthfloatWidth of the rectangle that defines the ellipse.
heightfloatHeight of the rectangle that defines the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_arc(pen, x, y, width, height, start_angle, sweep_angle)

 draw_arc(pen, x, y, width, height, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xintThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthintWidth of the rectangle that defines the ellipse.
heightintHeight of the rectangle that defines the ellipse.
start_angleintAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleintAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_arc_in_rect(pen, rect, start_angle, sweep_angle)

 draw_arc_in_rect(pen, rect, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleRectangleF structure that defines the boundaries of the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_arc_in_rect_f(pen, rect, start_angle, sweep_angle)

 draw_arc_in_rect_f(pen, rect, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_arc_xy(pen, x, y, width, height, start_angle, sweep_angle)

 draw_arc_xy(pen, x, y, width, height, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xintThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthintWidth of the rectangle that defines the ellipse.
heightintHeight of the rectangle that defines the ellipse.
start_angleintAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_angleintAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_arc_xyf(pen, x, y, width, height, start_angle, sweep_angle)

 draw_arc_xyf(pen, x, y, width, height, start_angle, sweep_angle) 

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xfloatThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthfloatWidth of the rectangle that defines the ellipse.
heightfloatHeight of the rectangle that defines the ellipse.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Method: draw_bezier(pen, pt1, pt2, pt3, pt4)

 draw_bezier(pen, pt1, pt2, pt3, pt4) 

Draws a Bézier spline defined by four PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pt1PointFPointF structure that represents the starting point of the curve.
pt2PointFPointF structure that represents the first control point for the curve.
pt3PointFPointF structure that represents the second control point for the curve.
pt4PointFPointF structure that represents the ending point of the curve.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_bezier(pen, pt1, pt2, pt3, pt4)

 draw_bezier(pen, pt1, pt2, pt3, pt4) 

Draws a Bézier spline defined by four PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pt1PointPointF structure that represents the starting point of the curve.
pt2PointPointF structure that represents the first control point for the curve.
pt3PointPointF structure that represents the second control point for the curve.
pt4PointPointF structure that represents the ending point of the curve.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_bezier(pen, x1, y1, x2, y2, x3, y3, x4, y4)

 draw_bezier(pen, x1, y1, x2, y2, x3, y3, x4, y4) 

Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
x1floatThe x-coordinate of the starting point of the curve.
y1floatThe y-coordinate of the starting point of the curve.
x2floatThe x-coordinate of the first control point of the curve.
y2floatThe y-coordinate of the first control point of the curve.
x3floatThe x-coordinate of the second control point of the curve.
y3floatThe y-coordinate of the second control point of the curve.
x4floatThe x-coordinate of the ending point of the curve.
y4floatThe y-coordinate of the ending point of the curve.

Method: draw_bezier_by_points(pen, pt1, pt2, pt3, pt4)

 draw_bezier_by_points(pen, pt1, pt2, pt3, pt4) 

Draws a Bézier spline defined by four PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pt1PointPointF structure that represents the starting point of the curve.
pt2PointPointF structure that represents the first control point for the curve.
pt3PointPointF structure that represents the second control point for the curve.
pt4PointPointF structure that represents the ending point of the curve.

Method: draw_bezier_by_points_f(pen, pt1, pt2, pt3, pt4)

 draw_bezier_by_points_f(pen, pt1, pt2, pt3, pt4) 

Draws a Bézier spline defined by four PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pt1PointFPointF structure that represents the starting point of the curve.
pt2PointFPointF structure that represents the first control point for the curve.
pt3PointFPointF structure that represents the second control point for the curve.
pt4PointFPointF structure that represents the ending point of the curve.

Method: draw_beziers(pen, points)

 draw_beziers(pen, points) 

Draws a series of Bézier splines from an array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]Array of Point structures that represent the points that determine the curve.

Method: draw_beziers(pen, points)

 draw_beziers(pen, points) 

Draws a series of Bézier splines from an array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]Array of Point structures that represent the points that determine the curve.

Method: draw_beziers_by_pt_array(pen, points)

 draw_beziers_by_pt_array(pen, points) 

Draws a series of Bézier splines from an array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]Array of Point structures that represent the points that determine the curve.

Method: draw_beziers_by_pt_array_f(pen, points)

 draw_beziers_by_pt_array_f(pen, points) 

Draws a series of Bézier splines from an array of PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]Array of PointF structures that represent the points that determine the curve.

Method: draw_closed_curve(pen, points)

 draw_closed_curve(pen, points) 

Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.

Method: draw_closed_curve(pen, points)

 draw_closed_curve(pen, points) 

Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that define the spline.

Method: draw_closed_curve(pen, points, tension)

 draw_closed_curve(pen, points, tension) 

Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_closed_curve(pen, points, tension)

 draw_closed_curve(pen, points, tension) 

Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that define the spline.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_closed_curve_by_points(pen, points)

 draw_closed_curve_by_points(pen, points) 

Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that define the spline.

Method: draw_closed_curve_by_points_f(pen, points)

 draw_closed_curve_by_points_f(pen, points) 

Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.

Method: draw_closed_curve_by_points_f_tension(pen, points, tension)

 draw_closed_curve_by_points_f_tension(pen, points, tension) 

Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_closed_curve_by_points_tension(pen, points, tension)

 draw_closed_curve_by_points_tension(pen, points, tension) 

Draws a closed cardinal spline defined by an array of Point structures using a specified tension. This method uses a default FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of Point structures that define the spline.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve(pen, points)

 draw_curve(pen, points) 

Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_curve(pen, points)

 draw_curve(pen, points) 

Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that define the spline.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_curve(pen, points, offset, number_of_segments)

 draw_curve(pen, points, offset, number_of_segments) 

Draws a cardinal spline through a specified array of PointF structures. The drawing begins offset from the beginning of the array.
This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.
offsetintOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsintNumber of segments after the starting point to include in the curve.

Method: draw_curve(pen, points, offset, number_of_segments, tension)

 draw_curve(pen, points, offset, number_of_segments, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.
offsetintOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsintNumber of segments after the starting point to include in the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve(pen, points, offset, number_of_segments, tension)

 draw_curve(pen, points, offset, number_of_segments, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that define the spline.
offsetintOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsintNumber of segments after the starting point to include in the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve(pen, points, tension)

 draw_curve(pen, points, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that represent the points that define the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve(pen, points, tension)

 draw_curve(pen, points, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of PointF structures that represent the points that define the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve_by_point_fs(pen, points)

 draw_curve_by_point_fs(pen, points) 

Draws a cardinal spline through a specified array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of Point structures that define the spline.

Method: draw_curve_by_point_fs_tension(pen, points, tension)

 draw_curve_by_point_fs_tension(pen, points, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that represent the points that define the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve_by_points(pen, points)

 draw_curve_by_points(pen, points) 

Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.

Method: draw_curve_by_points_f_offs_num_segm_tension(pen, points, offset, number_of_segments, tension)

 draw_curve_by_points_f_offs_num_segm_tension(pen, points, offset, number_of_segments, tension) 

Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPointF[]Array of PointF structures that define the spline.
offsetintOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsintNumber of segments after the starting point to include in the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve_by_points_offs_num_segm_tension(pen, points, offset, number_of_segments, tension)

 draw_curve_by_points_offs_num_segm_tension(pen, points, offset, number_of_segments, tension) 

Draws a cardinal spline through a specified array of Point structures using a specified tension.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of Point structures that define the spline.
offsetintOffset from the first element in the array of the points parameter to the starting point in the curve.
number_of_segmentsintNumber of segments after the starting point to include in the curve.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_curve_by_points_tension(pen, points, tension)

 draw_curve_by_points_tension(pen, points, tension) 

Draws a cardinal spline through a specified array of Point structures using a specified tension.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and height of the curve.
pointsPoint[]Array of Point structures that define the spline.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: draw_ellipse(pen, rect)

 draw_ellipse(pen, rect) 

Draws an ellipse defined by a bounding RectangleF.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_ellipse(pen, rect)

 draw_ellipse(pen, rect) 

Draws an ellipse defined by a bounding RectangleF.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleRectangleF structure that defines the boundaries of the ellipse.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_ellipse(pen, x, y, width, height)

 draw_ellipse(pen, x, y, width, height) 

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthfloatWidth of the bounding rectangle that defines the ellipse.
heightfloatHeight of the bounding rectangle that defines the ellipse.

Method: draw_ellipse(pen, x, y, width, height)

 draw_ellipse(pen, x, y, width, height) 

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthintWidth of the bounding rectangle that defines the ellipse.
heightintHeight of the bounding rectangle that defines the ellipse.

Method: draw_ellipse_by_xy(pen, x, y, width, height)

 draw_ellipse_by_xy(pen, x, y, width, height) 

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthintWidth of the bounding rectangle that defines the ellipse.
heightintHeight of the bounding rectangle that defines the ellipse.

Method: draw_ellipse_by_xyf(pen, x, y, width, height)

 draw_ellipse_by_xyf(pen, x, y, width, height) 

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthfloatWidth of the bounding rectangle that defines the ellipse.
heightfloatHeight of the bounding rectangle that defines the ellipse.

Method: draw_ellipse_f(pen, rect)

 draw_ellipse_f(pen, rect) 

Draws an ellipse defined by a bounding RectangleF.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.

Method: draw_image(image, dest_points)

 draw_image(image, dest_points) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.

Method: draw_image(image, dest_points)

 draw_image(image, dest_points) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.

Method: draw_image(image, dest_points, src_rect)

 draw_image(image, dest_points, src_rect) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.

Method: draw_image(image, dest_points, src_rect)

 draw_image(image, dest_points, src_rect) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.

Method: draw_image(image, dest_points, src_rect, src_unit)

 draw_image(image, dest_points, src_rect, src_unit) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.
src_unitGraphicsUnitThe units of measure.

Method: draw_image(image, dest_points, src_rect, src_unit)

 draw_image(image, dest_points, src_rect, src_unit) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.
src_unitGraphicsUnitThe units of measure.

Method: draw_image(image, dest_points, src_rect, src_unit, image_attributes)

 draw_image(image, dest_points, src_rect, src_unit, image_attributes) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.
src_unitGraphicsUnitThe units of measure.
image_attributesImageAttributesThe image attributes.

Method: draw_image(image, dest_points, src_rect, src_unit, image_attributes)

 draw_image(image, dest_points, src_rect, src_unit, image_attributes) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.
src_unitGraphicsUnitThe units of measure.
image_attributesImageAttributesThe image attributes.

Method: draw_image(source_image, point)

 draw_image(source_image, point) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointFPointF structure that represents the upper-left corner of the drawn image.

Method: draw_image(source_image, point)

 draw_image(source_image, point) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointPointF structure that represents the upper-left corner of the drawn image.

Method: draw_image(source_image, rect)

 draw_image(source_image, rect) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleFRectangleF structure that specifies the location and size of the drawn image.

Method: draw_image(source_image, rect)

 draw_image(source_image, rect) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleRectangleF structure that specifies the location and size of the drawn image.

Method: draw_image(source_image, rect_destination, graphics_unit)

 draw_image(source_image, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image(source_image, rect_destination, graphics_unit)

 draw_image(source_image, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleFThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image(source_image, rect_destination, graphics_unit, image_attributes)

 draw_image(source_image, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image(source_image, rect_destination, graphics_unit, image_attributes)

 draw_image(source_image, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleFThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image(source_image, rect_source, rect_destination, graphics_unit)

 draw_image(source_image, rect_source, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleThe rect source.
rect_destinationRectangleThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image(source_image, rect_source, rect_destination, graphics_unit)

 draw_image(source_image, rect_source, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleFThe rect source.
rect_destinationRectangleFThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes)

 draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleThe rect source.
rect_destinationRectangleThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes)

 draw_image(source_image, rect_source, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleFThe rect source.
rect_destinationRectangleFThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image(source_image, x, y)

 draw_image(source_image, x, y) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xfloatThe x-coordinate of the upper-left corner of the drawn image.
yfloatThe y-coordinate of the upper-left corner of the drawn image.

Method: draw_image(source_image, x, y)

 draw_image(source_image, x, y) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.

Method: draw_image(source_image, x, y, width, height)

 draw_image(source_image, x, y, width, height) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xfloatThe x-coordinate of the upper-left corner of the drawn image.
yfloatThe y-coordinate of the upper-left corner of the drawn image.
widthfloatWidth of the drawn image.
heightfloatHeight of the drawn image.

Method: draw_image(source_image, x, y, width, height)

 draw_image(source_image, x, y, width, height) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.
widthintWidth of the drawn image.
heightintHeight of the drawn image.

Method: draw_image_at_point(source_image, point)

 draw_image_at_point(source_image, point) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointPointF structure that represents the upper-left corner of the drawn image.

Method: draw_image_at_point_f(source_image, point)

 draw_image_at_point_f(source_image, point) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointFPointF structure that represents the upper-left corner of the drawn image.

Method: draw_image_at_xy(source_image, x, y)

 draw_image_at_xy(source_image, x, y) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.

Method: draw_image_at_xyf(source_image, x, y)

 draw_image_at_xyf(source_image, x, y) 

Draws the specified Graphics.image, using its original physical size, at the specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xfloatThe x-coordinate of the upper-left corner of the drawn image.
yfloatThe y-coordinate of the upper-left corner of the drawn image.

Method: draw_image_dest_point_f_src_rect_f_with_unit(image, dest_points, src_rect, src_unit)

 draw_image_dest_point_f_src_rect_f_with_unit(image, dest_points, src_rect, src_unit) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.
src_unitGraphicsUnitThe units of measure.

Method: draw_image_dest_point_f_src_rect_f_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes)

 draw_image_dest_point_f_src_rect_f_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.
src_unitGraphicsUnitThe units of measure.
image_attributesImageAttributesThe image attributes.

Method: draw_image_dest_points_f_src_rect_f(image, dest_points, src_rect)

 draw_image_dest_points_f_src_rect_f(image, dest_points, src_rect) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.
src_rectRectangleFThe source rectangle.

Method: draw_image_dest_points_src_rect(image, dest_points, src_rect)

 draw_image_dest_points_src_rect(image, dest_points, src_rect) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.

Method: draw_image_dest_points_src_rect_with_unit(image, dest_points, src_rect, src_unit)

 draw_image_dest_points_src_rect_with_unit(image, dest_points, src_rect, src_unit) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.
src_unitGraphicsUnitThe units of measure.

Method: draw_image_dest_points_src_rect_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes)

 draw_image_dest_points_src_rect_with_unit_and_attribs(image, dest_points, src_rect, src_unit, image_attributes) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.
src_rectRectangleThe source rectangle.
src_unitGraphicsUnitThe units of measure.
image_attributesImageAttributesThe image attributes.

Method: draw_image_dest_rect_f_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes)

 draw_image_dest_rect_f_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleFThe destination rectangle to draw in.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image_dest_rect_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes)

 draw_image_dest_rect_with_unit_attribs(source_image, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image_in_rect(source_image, x, y, width, height)

 draw_image_in_rect(source_image, x, y, width, height) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.
widthintWidth of the drawn image.
heightintHeight of the drawn image.

Method: draw_image_in_rect_f(source_image, x, y, width, height)

 draw_image_in_rect_f(source_image, x, y, width, height) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xfloatThe x-coordinate of the upper-left corner of the drawn image.
yfloatThe y-coordinate of the upper-left corner of the drawn image.
widthfloatWidth of the drawn image.
heightfloatHeight of the drawn image.

Method: draw_image_in_rectangle(source_image, rect)

 draw_image_in_rectangle(source_image, rect) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleRectangle structure that specifies the location and size of the drawn image.

Method: draw_image_points(image, dest_points)

 draw_image_points(image, dest_points) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPoint[]Array of three PointF structures that define a parallelogram.

Method: draw_image_points_f(image, dest_points)

 draw_image_points_f(image, dest_points) 

Draws the specified portion of the specified image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
imageImageThe image to draw.
dest_pointsPointF[]Array of three PointF structures that define a parallelogram.

Method: draw_image_rectangle_f(source_image, rect)

 draw_image_rectangle_f(source_image, rect) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleFRectangleF structure that specifies the location and size of the drawn image.

Method: draw_image_src_dest_rects_f_with_unit(source_image, rect_source, rect_destination, graphics_unit)

 draw_image_src_dest_rects_f_with_unit(source_image, rect_source, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleFThe rect source.
rect_destinationRectangleFThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image_src_dest_rects_with_unit(source_image, rect_source, rect_destination, graphics_unit)

 draw_image_src_dest_rects_with_unit(source_image, rect_source, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleThe rect source.
rect_destinationRectangleThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image_src_dst_rect_f_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes)

 draw_image_src_dst_rect_f_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleFThe source rectangle.
rect_destinationRectangleFThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit to use.
image_attributesImageAttributesThe image attributes to use.

Method: draw_image_src_dst_rects_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes)

 draw_image_src_dst_rects_with_unit_and_attribs(source_image, rect_source, rect_destination, graphics_unit, image_attributes) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_sourceRectangleThe rect source.
rect_destinationRectangleThe rect destination.
graphics_unitGraphicsUnitThe graphics unit.
image_attributesImageAttributesThe image attributes.

Method: draw_image_to_rect_f_with_unit(source_image, rect_destination, graphics_unit)

 draw_image_to_rect_f_with_unit(source_image, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleFThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image_to_rect_with_unit(source_image, rect_destination, graphics_unit)

 draw_image_to_rect_with_unit(source_image, rect_destination, graphics_unit) 

Draws the specified Graphics.image at the specified location and with the specified size.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rect_destinationRectangleThe destination rectangle.
graphics_unitGraphicsUnitThe graphics unit.

Method: draw_image_unscaled(source_image, point)

 draw_image_unscaled(source_image, point) 

Draws a specified image using its original physical size at a specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointPoint structure that specifies the upper-left corner of the drawn image.

Method: draw_image_unscaled(source_image, rect)

 draw_image_unscaled(source_image, rect) 

Draws a specified image using its original physical size at a specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleRectangle that specifies the upper-left corner of the drawn image. The X and Y properties of the rectangle specify the upper-left corner. The Width and Height properties are ignored.

Method: draw_image_unscaled(source_image, x, y)

 draw_image_unscaled(source_image, x, y) 

Draws the specified image using its original physical size at the location specified by a coordinate pair.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.

Method: draw_image_unscaled(source_image, x, y, width, height)

 draw_image_unscaled(source_image, x, y, width, height) 

Draws a specified image using its original physical size at a specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
xintThe x-coordinate of the upper-left corner of the drawn image.
yintThe y-coordinate of the upper-left corner of the drawn image.
widthintThe parameter is not used.
heightintThe parameter is not used.

Method: draw_image_unscaled_and_clipped(source_image, rect)

 draw_image_unscaled_and_clipped(source_image, rect) 

Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleThe Rectangle in which to draw the image.

Method: draw_image_unscaled_in_rectangle(source_image, rect)

 draw_image_unscaled_in_rectangle(source_image, rect) 

Draws a specified image using its original physical size at a specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
rectRectangleRectangle that specifies the upper-left corner of the drawn image. The X and Y properties of the rectangle specify the upper-left corner. The Width and Height properties are ignored.

Method: draw_image_unscaled_to_point(source_image, point)

 draw_image_unscaled_to_point(source_image, point) 

Draws a specified image using its original physical size at a specified location.

Parameters:

ParameterTypeDescription
source_imageImageThe image to draw with.
pointPointPoint structure that specifies the upper-left corner of the drawn image.

Method: draw_line(pen, point1, point2)

 draw_line(pen, point1, point2) 

Draws a line connecting two Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
point1PointPoint structure that represents the first point to connect.
point2PointPoint structure that represents the second point to connect.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_line(pen, point1, point2)

 draw_line(pen, point1, point2) 

Draws a line connecting two Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
point1PointFPoint structure that represents the first point to connect.
point2PointFPoint structure that represents the second point to connect.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_line(pen, x1, y1, x2, y2)

 draw_line(pen, x1, y1, x2, y2) 

Draws a line connecting the two points specified by the coordinate pairs.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1intThe x-coordinate of the first point.
y1intThe y-coordinate of the first point.
x2intThe x-coordinate of the second point.
y2intThe y-coordinate of the second point.

Method: draw_line(pen, x1, y1, x2, y2)

 draw_line(pen, x1, y1, x2, y2) 

Draws a line connecting the two points specified by the coordinate pairs.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1floatThe x-coordinate of the first point.
y1floatThe y-coordinate of the first point.
x2floatThe x-coordinate of the second point.
y2floatThe y-coordinate of the second point.

Method: draw_line_by_xy(pen, x1, y1, x2, y2)

 draw_line_by_xy(pen, x1, y1, x2, y2) 

Draws a line connecting the two points specified by the coordinate pairs.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1intThe x-coordinate of the first point.
y1intThe y-coordinate of the first point.
x2intThe x-coordinate of the second point.
y2intThe y-coordinate of the second point.

Method: draw_line_f_by_xy(pen, x1, y1, x2, y2)

 draw_line_f_by_xy(pen, x1, y1, x2, y2) 

Draws a line connecting the two points specified by the coordinate pairs.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1floatThe x-coordinate of the first point.
y1floatThe y-coordinate of the first point.
x2floatThe x-coordinate of the second point.
y2floatThe y-coordinate of the second point.

Method: draw_line_point_f(pen, point1, point2)

 draw_line_point_f(pen, point1, point2) 

Draws a line connecting two PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
point1PointFPointF structure that represents the first point to connect.
point2PointFPointF structure that represents the second point to connect.

Method: draw_lines(pen, points)

 draw_lines(pen, points) 

Draws a series of line segments that connect an array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line segments.
pointsPoint[]Array of Point structures that represent the points to connect.

Method: draw_lines(pen, points)

 draw_lines(pen, points) 

Draws a series of line segments that connect an array of Point structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line segments.
pointsPointF[]Array of Point structures that represent the points to connect.

Method: draw_lines_f(pen, points)

 draw_lines_f(pen, points) 

Draws a series of line segments that connect an array of PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line segments.
pointsPointF[]Array of PointF structures that represent the points to connect.

Method: draw_path(pen, path)

 draw_path(pen, path) 

Draws a GraphicsPath.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the path.
pathGraphicsPathGraphicsPath to draw.

See also:

Example # 1: This examples make use of GraphicsPath and Graphics classes to create and man…

Method: draw_pie(pen, rect, start_angle, sweep_angle)

 draw_pie(pen, rect, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_pie(pen, rect, start_angle, sweep_angle)

 draw_pie(pen, rect, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_pie(pen, x, y, width, height, start_angle, sweep_angle)

 draw_pie(pen, x, y, width, height, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthfloatWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightfloatHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_pie(pen, x, y, width, height, start_angle, sweep_angle)

 draw_pie(pen, x, y, width, height, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthintWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightintHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleintAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleintAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_pie_in_rect(pen, rect, start_angle, sweep_angle)

 draw_pie_in_rect(pen, rect, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_pie_in_rect_f(pen, rect, start_angle, sweep_angle)

 draw_pie_in_rect_f(pen, rect, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_pie_xy(pen, x, y, width, height, start_angle, sweep_angle)

 draw_pie_xy(pen, x, y, width, height, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthintWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightintHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleintAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleintAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_pie_xyf(pen, x, y, width, height, start_angle, sweep_angle)

 draw_pie_xyf(pen, x, y, width, height, start_angle, sweep_angle) 

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthfloatWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightfloatHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_anglefloatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_anglefloatAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Method: draw_polygon(pen, points)

 draw_polygon(pen, points) 

Draws a polygon defined by an array of PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the polygon.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_polygon(pen, points)

 draw_polygon(pen, points) 

Draws a polygon defined by an array of PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the polygon.
pointsPoint[]Array of PointF structures that represent the vertices of the polygon.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_polygon_f(pen, points)

 draw_polygon_f(pen, points) 

Draws a polygon defined by an array of PointF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the polygon.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon.

Method: draw_rect(pen, x, y, width, height)

 draw_rect(pen, x, y, width, height) 

Draws a rectangle specified by a coordinate pair, a width, and a height.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xintThe x-coordinate of the upper-left corner of the rectangle to draw.
yintThe y-coordinate of the upper-left corner of the rectangle to draw.
widthintThe width of the rectangle to draw.
heightintThe height of the rectangle to draw.

Method: draw_rect_f(pen, x, y, width, height)

 draw_rect_f(pen, x, y, width, height) 

Draws a rectangle specified by a coordinate pair, a width, and a height.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xfloatThe x-coordinate of the upper-left corner of the rectangle to draw.
yfloatThe y-coordinate of the upper-left corner of the rectangle to draw.
widthfloatThe width of the rectangle to draw.
heightfloatThe height of the rectangle to draw.

Method: draw_rectangle(pen, rect)

 draw_rectangle(pen, rect) 

Draws a rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
rectRectangleFA RectangleF structure that represents the rectangle to draw.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_rectangle(pen, rect)

 draw_rectangle(pen, rect) 

Draws a rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
rectRectangleA RectangleF structure that represents the rectangle to draw.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_rectangle(pen, x, y, width, height)

 draw_rectangle(pen, x, y, width, height) 

Draws a rectangle specified by a coordinate pair, a width, and a height.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xfloatThe x-coordinate of the upper-left corner of the rectangle to draw.
yfloatThe y-coordinate of the upper-left corner of the rectangle to draw.
widthfloatThe width of the rectangle to draw.
heightfloatThe height of the rectangle to draw.

Method: draw_rectangle(pen, x, y, width, height)

 draw_rectangle(pen, x, y, width, height) 

Draws a rectangle specified by a coordinate pair, a width, and a height.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xintThe x-coordinate of the upper-left corner of the rectangle to draw.
yintThe y-coordinate of the upper-left corner of the rectangle to draw.
widthintThe width of the rectangle to draw.
heightintThe height of the rectangle to draw.

Method: draw_rectangle_f(pen, rect)

 draw_rectangle_f(pen, rect) 

Draws a rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
rectRectangleFA RectangleF structure that represents the rectangle to draw.

Method: draw_rectangles(pen, rects)

 draw_rectangles(pen, rects) 

Draws a series of rectangles specified by RectangleF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the outlines of the rectangles.
rectsRectangleF[]Array of RectangleF structures that represent the rectangles to draw.

See also:

Example # 1: This example shows the creation and usage Pen objects. The example creates a …

Method: draw_rectangles(pen, rects)

 draw_rectangles(pen, rects) 

Draws a series of rectangles specified by RectangleF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the outlines of the rectangles.
rectsRectangle[]Array of RectangleF structures that represent the rectangles to draw.

See also:

Example # 1: This example shows the creation and usage Pen objects. The example creates a …

Method: draw_rectangles_f(pen, rects)

 draw_rectangles_f(pen, rects) 

Draws a series of rectangles specified by RectangleF structures.

Parameters:

ParameterTypeDescription
penPenPen that determines the color, width, and style of the outlines of the rectangles.
rectsRectangleF[]Array of RectangleF structures that represent the rectangles to draw.

Method: draw_string(s, font, brush, layout_rectangle)

 draw_string(s, font, brush, layout_rectangle) 

Draws the specified text string in the specified rectangle with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layout_rectangleRectangleFRectangleF structure that specifies the location of the drawn text.

Method: draw_string(s, font, brush, layout_rectangle, format)

 draw_string(s, font, brush, layout_rectangle, format) 

Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layout_rectangleRectangleFRectangleF structure that specifies the location of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Method: draw_string(s, font, brush, point)

 draw_string(s, font, brush, point) 

Draws the specified text string at the specified location with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.

See also:

Example # 1: This example uses Graphics class to create primitive shapes on the Image surf…

Method: draw_string(s, font, brush, point, format)

 draw_string(s, font, brush, point, format) 

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Method: draw_string(s, font, brush, x, y)

 draw_string(s, font, brush, x, y) 

Draws the specified text string at the specified location with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
xfloatThe x-coordinate of the upper-left corner of the drawn text.
yfloatThe y-coordinate of the upper-left corner of the drawn text.

Method: draw_string(s, font, brush, x, y, format)

 draw_string(s, font, brush, x, y, format) 

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
xfloatThe x-coordinate of the upper-left corner of the drawn text.
yfloatThe y-coordinate of the upper-left corner of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Method: draw_string_at_point_f(s, font, brush, point)

 draw_string_at_point_f(s, font, brush, point) 

Draws the specified text string at the specified location with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.

Method: draw_string_at_point_f_format(s, font, brush, point, format)

 draw_string_at_point_f_format(s, font, brush, point, format) 

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Method: draw_string_at_xy(s, font, brush, x, y)

 draw_string_at_xy(s, font, brush, x, y) 

Draws the specified text string at the specified location with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
xfloatThe x-coordinate of the upper-left corner of the drawn text.
yfloatThe y-coordinate of the upper-left corner of the drawn text.

Method: draw_string_in_rect(s, font, brush, layout_rectangle)

 draw_string_in_rect(s, font, brush, layout_rectangle) 

Draws the specified text string in the specified rectangle with the specified Brush and Font objects.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layout_rectangleRectangleFRectangleF structure that specifies the location of the drawn text.

Method: draw_string_in_rect_f(s, font, brush, layout_rectangle, format)

 draw_string_in_rect_f(s, font, brush, layout_rectangle, format) 

Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

Parameters:

ParameterTypeDescription
sstringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layout_rectangleRectangleFRectangleF structure that specifies the location of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Method: fill_closed_curve(brush, points)

 fill_closed_curve(brush, points) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.

Method: fill_closed_curve(brush, points)

 fill_closed_curve(brush, points) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that define the spline.

Method: fill_closed_curve(brush, points, fillmode)

 fill_closed_curve(brush, points, fillmode) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.

Method: fill_closed_curve(brush, points, fillmode)

 fill_closed_curve(brush, points, fillmode) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.

Method: fill_closed_curve(brush, points, fillmode, tension)

 fill_closed_curve(brush, points, fillmode, tension) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

Parameters:

ParameterTypeDescription
brushBrushA Brush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: fill_closed_curve(brush, points, fillmode, tension)

 fill_closed_curve(brush, points, fillmode, tension) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

Parameters:

ParameterTypeDescription
brushBrushA Brush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: fill_closed_curve_by_point(brush, points)

 fill_closed_curve_by_point(brush, points) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that define the spline.

Method: fill_closed_curve_by_point_f(brush, points)

 fill_closed_curve_by_point_f(brush, points) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and FillMode.ALTERNATE fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.

Method: fill_closed_curve_by_point_f_fill_mode_tension(brush, points, fillmode, tension)

 fill_closed_curve_by_point_f_fill_mode_tension(brush, points, fillmode, tension) 

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

Parameters:

ParameterTypeDescription
brushBrushA Brush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: fill_closed_curve_by_point_fill_mode(brush, points, fillmode)

 fill_closed_curve_by_point_fill_mode(brush, points, fillmode) 

Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode. This method uses a default tension of 0.5.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.

Method: fill_closed_curve_by_point_fill_mode_tension(brush, points, fillmode, tension)

 fill_closed_curve_by_point_fill_mode_tension(brush, points, fillmode, tension) 

Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.
fillmodeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionfloatValue greater than or equal to 0.0F that specifies the tension of the curve.

Method: fill_ellipse(brush, rect)

 fill_ellipse(brush, rect) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse.

Method: fill_ellipse(brush, rect)

 fill_ellipse(brush, rect) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangleF structure that represents the bounding rectangle that defines the ellipse.

Method: fill_ellipse(brush, x, y, width, height)

 fill_ellipse(brush, x, y, width, height) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthfloatWidth of the bounding rectangle that defines the ellipse.
heightfloatHeight of the bounding rectangle that defines the ellipse.

Method: fill_ellipse(brush, x, y, width, height)

 fill_ellipse(brush, x, y, width, height) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthintWidth of the bounding rectangle that defines the ellipse.
heightintHeight of the bounding rectangle that defines the ellipse.

Method: fill_ellipse_at_xywh(brush, x, y, width, height)

 fill_ellipse_at_xywh(brush, x, y, width, height) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthintWidth of the bounding rectangle that defines the ellipse.
heightintHeight of the bounding rectangle that defines the ellipse.

Method: fill_ellipse_at_xywhf(brush, x, y, width, height)

 fill_ellipse_at_xywhf(brush, x, y, width, height) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthfloatWidth of the bounding rectangle that defines the ellipse.
heightfloatHeight of the bounding rectangle that defines the ellipse.

Method: fill_ellipse_in_rect(brush, rect)

 fill_ellipse_in_rect(brush, rect) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangleF structure that represents the bounding rectangle that defines the ellipse.

Method: fill_ellipse_in_rect_f(brush, rect)

 fill_ellipse_in_rect_f(brush, rect) 

Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse.

Method: fill_path(brush, path)

 fill_path(brush, path) 

Fills the interior of a GraphicsPath.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pathGraphicsPathGraphicsPath that represents the path to fill.

Method: fill_pie(brush, rect, start_angle, sweep_angle)

 fill_pie(brush, rect, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

See also:

Example # 1: The following example shows how to compose an animated GIF image from individ…

Method: fill_pie(brush, rect, start_angle, sweep_angle)

 fill_pie(brush, rect, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

See also:

Example # 1: The following example shows how to compose an animated GIF image from individ…

Method: fill_pie(brush, x, y, width, height, start_angle, sweep_angle)

 fill_pie(brush, x, y, width, height, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthfloatWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightfloatHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_pie(brush, x, y, width, height, start_angle, sweep_angle)

 fill_pie(brush, x, y, width, height, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthintWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightintHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleintAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleintAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_pie_at_xy(brush, x, y, width, height, start_angle, sweep_angle)

 fill_pie_at_xy(brush, x, y, width, height, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yintThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthintWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightintHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_angleintAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_angleintAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_pie_at_xyf(brush, x, y, width, height, start_angle, sweep_angle)

 fill_pie_at_xyf(brush, x, y, width, height, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthfloatWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightfloatHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_pie_in_rect(brush, rect, start_angle, sweep_angle)

 fill_pie_in_rect(brush, rect, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_pie_in_rect_f(brush, rect, start_angle, sweep_angle)

 fill_pie_in_rect_f(brush, rect, start_angle, sweep_angle) 

Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
start_anglefloatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweep_anglefloatAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Method: fill_polygon(brush, points)

 fill_polygon(brush, points) 

Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon to fill.

Method: fill_polygon(brush, points)

 fill_polygon(brush, points) 

Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that represent the vertices of the polygon to fill.

Method: fill_polygon(brush, points, fill_mode)

 fill_polygon(brush, points, fill_mode) 

Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon to fill.
fill_modeFillModeMember of the FillMode enumeration that determines the style of the fill.

Method: fill_polygon(brush, points, fill_mode)

 fill_polygon(brush, points, fill_mode) 

Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that represent the vertices of the polygon to fill.
fill_modeFillModeMember of the FillMode enumeration that determines the style of the fill.

Method: fill_polygon_by_point(brush, points)

 fill_polygon_by_point(brush, points) 

Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF structures that represent the vertices of the polygon to fill.

Method: fill_polygon_by_point_f(brush, points)

 fill_polygon_by_point_f(brush, points) 

Fills the interior of a polygon defined by an array of points specified by PointF structures and FillMode.ALTERNATE.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon to fill.

Method: fill_polygon_by_point_f_fill_mode(brush, points, fill_mode)

 fill_polygon_by_point_f_fill_mode(brush, points, fill_mode) 

Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that represent the vertices of the polygon to fill.
fill_modeFillModeMember of the FillMode enumeration that determines the style of the fill.

Method: fill_polygon_by_point_fill_mode(brush, points, fill_mode)

 fill_polygon_by_point_fill_mode(brush, points, fill_mode) 

Fills the interior of a polygon defined by an array of points specified by Point structures using the specified fill mode.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that represent the vertices of the polygon to fill.
fill_modeFillModeMember of the FillMode enumeration that determines the style of the fill.

Method: fill_rectangle(brush, rect)

 fill_rectangle(brush, rect) 

Fills the interior of a rectangle specified by a Rectangle structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the rectangle to fill.

Method: fill_rectangle(brush, rect)

 fill_rectangle(brush, rect) 

Fills the interior of a rectangle specified by a Rectangle structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangle structure that represents the rectangle to fill.

Method: fill_rectangle(brush, x, y, width, height)

 fill_rectangle(brush, x, y, width, height) 

Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the rectangle to fill.
yfloatThe y-coordinate of the upper-left corner of the rectangle to fill.
widthfloatWidth of the rectangle to fill.
heightfloatHeight of the rectangle to fill.

Method: fill_rectangle(brush, x, y, width, height)

 fill_rectangle(brush, x, y, width, height) 

Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the rectangle to fill.
yintThe y-coordinate of the upper-left corner of the rectangle to fill.
widthintWidth of the rectangle to fill.
heightintHeight of the rectangle to fill.

Method: fill_rectangle_f(brush, rect)

 fill_rectangle_f(brush, rect) 

Fills the interior of a rectangle specified by a RectangleF structure.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the rectangle to fill.

Method: fill_rectangle_f_with_brush(brush, x, y, width, height)

 fill_rectangle_f_with_brush(brush, x, y, width, height) 

Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xfloatThe x-coordinate of the upper-left corner of the rectangle to fill.
yfloatThe y-coordinate of the upper-left corner of the rectangle to fill.
widthfloatWidth of the rectangle to fill.
heightfloatHeight of the rectangle to fill.

Method: fill_rectangle_with_brush(brush, x, y, width, height)

 fill_rectangle_with_brush(brush, x, y, width, height) 

Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xintThe x-coordinate of the upper-left corner of the rectangle to fill.
yintThe y-coordinate of the upper-left corner of the rectangle to fill.
widthintWidth of the rectangle to fill.
heightintHeight of the rectangle to fill.

Method: fill_rectangles(brush, rects)

 fill_rectangles(brush, rects) 

Fills the interiors of a series of rectangles specified by Rectangle structures.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectsRectangle[]Array of Rectangle structures that represent the rectangles to fill.

Method: fill_rectangles(brush, rects)

 fill_rectangles(brush, rects) 

Fills the interiors of a series of rectangles specified by Rectangle structures.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectsRectangleF[]Array of Rectangle structures that represent the rectangles to fill.

Method: fill_rectangles_f(brush, rects)

 fill_rectangles_f(brush, rects) 

Fills the interiors of a series of rectangles specified by RectangleF structures.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectsRectangleF[]Array of Rectangle structures that represent the rectangles to fill.

Method: fill_region(brush, region)

 fill_region(brush, region) 

Fills the interior of a Region.

Parameters:

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
regionRegionRegion that represents the area to fill.

Method: measure_string(text, font, layout_area, string_format)

 measure_string(text, font, layout_area, string_format) 

Measures the specified text string with specified parameters

Parameters:

ParameterTypeDescription
textstringThe text to measure.
fontFontThe font to measure.
layout_areaSizeFThe layout area.
string_formatStringFormatThe string format.

Returns

TypeDescription
SizeFSize in pixels of measured text string

Method: multiply_transform(matrix)

 multiply_transform(matrix) 

Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix by prepending the specified Matrix.

Parameters:

ParameterTypeDescription
matrixMatrixThe Matrix by which to multiply the geometric transform.

Method: multiply_transform(matrix, order)

 multiply_transform(matrix, order) 

Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix in the specified order.

Parameters:

ParameterTypeDescription
matrixMatrixThe Matrix by which to multiply the geometric transform.
orderMatrixOrderA MatrixOrder that specifies in which order to multiply the two matrices.

Method: rotate_transform(angle)

 rotate_transform(angle) 

Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.

Parameters:

ParameterTypeDescription
anglefloatThe angle of rotation.

Method: rotate_transform(angle, order)

 rotate_transform(angle, order) 

Rotates the local geometric transform by the specified amount in the specified order.

Parameters:

ParameterTypeDescription
anglefloatThe angle of rotation.
orderMatrixOrderA MatrixOrder that specifies whether to append or prepend the rotation matrix.

Method: scale_transform(sx, sy)

 scale_transform(sx, sy) 

Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.

Parameters:

ParameterTypeDescription
sxfloatThe amount by which to scale the transform in the x-axis direction.
syfloatThe amount by which to scale the transform in the y-axis direction.

Method: scale_transform(sx, sy, order)

 scale_transform(sx, sy, order) 

Scales the local geometric transform by the specified amounts in the specified order.

Parameters:

ParameterTypeDescription
sxfloatThe amount by which to scale the transform in the x-axis direction.
syfloatThe amount by which to scale the transform in the y-axis direction.
orderMatrixOrderA MatrixOrder that specifies whether to append or prepend the scaling matrix.

Method: translate_transform(dx, dy)

 translate_transform(dx, dy) 

Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.

Parameters:

ParameterTypeDescription
dxfloatThe value of the translation in x.
dyfloatThe value of the translation in y.

Method: translate_transform(dx, dy, order)

 translate_transform(dx, dy, order) 

Translates the local geometric transform by the specified dimensions in the specified order.

Parameters:

ParameterTypeDescription
dxfloatThe value of the translation in x.
dyfloatThe value of the translation in y.
orderMatrixOrderThe order (prepend or append) in which to apply the translation.

Examples

This example uses Graphics class to create primitive shapes on the Image surface. To demonstrate the operation, the example creates a new Image in PNG format and draw primitive shapes on Image surface using Draw methods exposed by Graphics class


from aspose.imaging import Image, RotateFlipType, Graphics, Color, Pen, Rectangle, Point, Size,\
	Font, PointF
from aspose.imaging.brushes import SolidBrush
from aspose.imaging.imageoptions import PngOptions
from aspose.imaging.fileformats.psd import CompressionMethod, ColorModes
from aspose.imaging.sources import StreamSource

from os.path import join as path_join

#Creates an instance of file stream
with open(r"C:\temp\output.png", "w+b") as stream:
	#Create an instance of PngOptions and set its various properties
	pngOptions = PngOptions()
	#Set the Source for PngOptions
	pngOptions.source = StreamSource(stream)
	#Create an instance of Image 
	with Image.create(pngOptions, 500, 500) as image:
		#Create and initialize an instance of Graphics class
		graphics = Graphics(image)
		#Clear Graphics surface
		graphics.clear(Color.wheat);
		#Draw an Arc by specifying the Pen object having Black color, 
		#a Rectangle surrounding the Arc, Start Angle and Sweep Angle
		graphics.draw_arc(Pen(Color.black, 2.0), Rectangle(200, 200, 100, 200), 0, 300)
		#Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
		graphics.draw_bezier(Pen(Color.blue, 2.0), Point(250, 100), Point(300, 30), Point(450, 100), Point(235, 25))
		#Draw a Curve by specifying the Pen object having Green color and an array of Points
		graphics.draw_curve(Pen(Color.green, 2.0), [Point(100, 200), Point(100, 350), Point(200, 450)])
		#Draw an Ellipse using the Pen object and a surrounding Rectangle
		graphics.draw_ellipse(Pen(Color.yellow, 2.0), Rectangle(300, 300, 100, 100))
		#Draw a Line 
		graphics.draw_line(Pen(Color.violet, 2.0), Point(100, 100), Point(200, 200))
		#Draw a Pie segment
		graphics.draw_pie(Pen(Color.silver, 2.0), Rectangle(Point(200, 20), Size(200, 200)), 0, 45);
		#Draw a Polygon by specifying the Pen object having Red color and an array of Points
		graphics.draw_polygon(Pen(Color.red, 2.0), [Point(20, 100), Point(20, 200), Point(220, 20)])
		#Draw a Rectangle
		graphics.draw_rectangle(Pen(Color.orange, 2.0), Rectangle(Point(250, 250), Size(100, 100)))
		#Create a SolidBrush object and set its various properties
		brush = SolidBrush()
		brush.color = Color.purple
		#Draw a String using the SolidBrush object and Font, at specific Point
		graphics.draw_string("This image is created by Aspose.Imaging API", Font("Times New Roman", 16),
							 brush, PointF(50.0, 400.0))
		# save all changes.
		image.save();

This examples make use of GraphicsPath and Graphics classes to create and manipulate figures on an Image surface. Example creates a new Image (of type Tiff), clears the surface and draws paths with the help of GraphicsPath class. At the end draw_path method exposed by Graphics class is called to render the paths on surface.


from aspose.imaging import Image, Graphics, Color, GraphicsPath, Figure, RectangleF, PointF, SizeF
from aspose.imaging import Pen
from aspose.imaging.sources import StreamSource
from aspose.imaging.imageoptions import TiffOptions
from aspose.imaging.fileformats.tiff.enums import TiffExpectedFormat
from aspose.imaging.shapes import RectangleShape, EllipseShape, PieShape


# Create an instance of a file stream
with open(r"C:\temp\output.tiff", "w+b") as stream:
	# Create an instance of TiffOptions and set its various properties
	tiffOptions = TiffOptions(TiffExpectedFormat.DEFAULT)
	# Set the source for the instance of ImageOptions
	tiffOptions.source = StreamSource(stream)
	# Create an instance of Image
	with Image.create(tiffOptions, 500, 500) as image:
		# Create and initialize an instance of Graphics class
		graphics = Graphics(image)
		# Clear Graphics surface
		graphics.clear(Color.wheat);
		# Create an instance of GraphicsPath class
		graphics_path = GraphicsPath()
		# Create an instance of Figure class
		figure = Figure()
		# Add Shapes to Figure object
		figure.add_shape(RectangleShape(RectangleF(10.0, 10.0, 300.0, 300.0)))
		figure.add_shape(EllipseShape(RectangleF(50.0, 50.0, 300.0, 300.0)))
		figure.add_shape(PieShape(RectangleF(PointF(250.0, 250.0), SizeF(200.0, 200.0)), 0.0, 45.0))
		# Add Figure object to GraphicsPath
		graphics_path.add_figure(figure)
		# Draw path with Pen object of color Black
		graphics.draw_path(Pen(Color.black, 2.0), graphics_path)
		# save all changes.
		image.save()

This example shows the creation and usage Pen objects. The example creates a new Image and draw rectangles on the Image surface.


from aspose.imaging import Image, Graphics, Color, Pen, Rectangle, Point, Size
from aspose.imaging.brushes import HatchBrush
from aspose.imaging.imageoptions import BmpOptions
from aspose.imaging.sources import FileCreateSource

# Create an instance of BmpOptions and set its various properties
bmpOptions = BmpOptions()
bmpOptions.bits_per_pixel = 24
# Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
# Second Boolean parameter determines if the file to be created IsTemporal or not
bmpOptions.source = FileCreateSource(r"C:\temp\sample.bmp", False)
# Create an instance of Image at specified Path
with Image.create(bmpOptions, 500, 500) as image:
	# Create an instance of Graphics and initialize it with Image object
	graphics = Graphics(image)
	# Clear the Graphics surface with White Color
	graphics.clear(Color.white)
	#Create an instance of Pen with color Red and width 5
	pen = Pen(Color.red, 5.0);
	# Create an instance of HatchBrush and set its properties
	brush = HatchBrush()
	brush.background_color = Color.wheat;
	brush.foreground_color = Color.red;
	# Create an instance of Pen
	# initialize it with HatchBrush object and width
	brusedpen = Pen(brush, 5.0)
	# Draw Rectangles by specifying Pen object
	graphics.draw_rectangles(pen, [
		Rectangle(Point(210, 210), Size(100, 100)),
		Rectangle(Point(110, 110), Size(100, 100)),
		Rectangle(Point(310, 310), Size(100, 100)) ])

	# Draw Rectangles by specifying Pen object
	graphics.draw_rectangles(brusedpen, [
		Rectangle(Point(310, 110), Size(100, 100)),
		Rectangle(Point(110, 310), Size(100, 100)) ])

	# save all changes.
	image.save()

The following example shows how to compose an animated GIF image from individual GIF blocks.

from aspose.imaging.fileformats.gif.blocks import GifFrameBlock
from aspose.imaging.fileformats.gif import GifImage 
from aspose.imaging.brushes import SolidBrush
from aspose.imaging import Graphics, Color

# Create a GIF image 100 x 100 px.
# The first block is fully black by default.
with GifFrameBlock(100, 100) as firstBlock:
	with GifImage(firstBlock) as gifImage:
		# The first circle is red
		brush1 = SolidBrush(Color.red)

		# The second circle is black
		brush2 = SolidBrush(Color.black)

		# Gradually increase the angle of the red arc shape.
		for angle in range(10, 361, 10):
			block = GifFrameBlock(100, 100)
			gr = Graphics(block)
			gr.fill_pie(brush1, block.bounds, 0, angle)
			gifImage.add_block(block)
		
		# Gradually increase the angle of the black arc and wipe out the red arc.
		for angle in range(10, 361, 10):
			block = GifFrameBlock(100, 100)
			gr = Graphics(block)
			gr.fill_pie(brush2, block.bounds, 0, angle)
			gr.fill_pie(brush1, block.bounds, angle, 360 - angle)
			gifImage.add_block(block)

		gifImage.save("animated_radar.gif")