Packages

 

com.aspose.psd

Interfaces

Classes

Exceptions

com.aspose.psd

Class Graphics



  • public final class Graphics
    extends Object

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

    • Constructor Summary

      Constructors 
      Constructor and Description
      Graphics(Image sourceImage)
      Initializes a new instance of the Graphics class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void beginUpdate()
      Starts caching of the following graphics operations.
      void clear(Color color)
      Clears the graphics surface using the specified color.
      void drawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
      Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
      void drawArc(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)
      Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
      void drawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
      Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
      void drawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
      Draws an arc representing a portion of an ellipse specified by a Rectangle structure.
      void drawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
      Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
      void drawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)
      Draws a Bézier spline defined by four PointF structures.
      void drawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)
      Draws a Bézier spline defined by four Point structures.
      void drawBeziers(Pen pen, Point[] points)
      Draws a series of Bézier splines from an array of Point structures.
      void drawBeziers(Pen pen, PointF[] points)
      Draws a series of Bézier splines from an array of PointF structures.
      void drawClosedCurve(Pen pen, Point[] points)
      Draws a closed cardinal spline defined by an array of Point structures.
      void drawClosedCurve(Pen pen, Point[] points, float tension)
      Draws a closed cardinal spline defined by an array of Point structures using a specified tension.
      void drawClosedCurve(Pen pen, PointF[] points)
      Draws a closed cardinal spline defined by an array of PointF structures.
      void drawClosedCurve(Pen pen, PointF[] points, float tension)
      Draws a closed cardinal spline defined by an array of PointF structures using a specified tension.
      void drawCurve(Pen pen, Point[] points)
      Draws a cardinal spline through a specified array of Point structures.
      void drawCurve(Pen pen, Point[] points, float tension)
      Draws a cardinal spline through a specified array of Point structures using a specified tension.
      void drawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, float tension)
      Draws a cardinal spline through a specified array of Point structures using a specified tension.
      void drawCurve(Pen pen, PointF[] points)
      Draws a cardinal spline through a specified array of PointF structures.
      void drawCurve(Pen pen, PointF[] points, float tension)
      Draws a cardinal spline through a specified array of PointF structures using a specified tension.
      void drawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments)
      Draws a cardinal spline through a specified array of PointF structures.
      void drawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)
      Draws a cardinal spline through a specified array of PointF structures using a specified tension.
      void drawEllipse(Pen pen, float x, float y, float width, float height)
      Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
      void drawEllipse(Pen pen, int x, int y, int width, int height)
      Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
      void drawEllipse(Pen pen, Rectangle rect)
      Draws an ellipse specified by a bounding Rectangle structure.
      void drawEllipse(Pen pen, RectangleF rect)
      Draws an ellipse defined by a bounding RectangleF.
      void drawImage(Image sourceImage, float x, float y)
      Draws the specified Image, using its original physical size, at the specified location.
      void drawImage(Image sourceImage, float x, float y, float width, float height)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, int x, int y)
      Draws the specified image, using its original physical size, at the location specified by a coordinate pair.
      void drawImage(Image sourceImage, int x, int y, int width, int height)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Point point)
      Draws the specified Image, using its original physical size, at the specified location.
      void drawImage(Image image, Point[] destPoints)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, Point[] destPoints, Rectangle srcRect)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, Point[] destPoints, Rectangle srcRect, int srcUnit)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, Point[] destPoints, Rectangle srcRect, int srcUnit, ImageAttributes imageAttributes)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image sourceImage, PointF point)
      Draws the specified Image, using its original physical size, at the specified location.
      void drawImage(Image image, PointF[] destPoints)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, PointF[] destPoints, RectangleF srcRect)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, PointF[] destPoints, RectangleF srcRect, int srcUnit)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image image, PointF[] destPoints, RectangleF srcRect, int srcUnit, ImageAttributes imageAttributes)
      Draws the specified portion of the specified image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Rectangle rect)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, RectangleF rect)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, RectangleF rectDestination, int graphicsUnit)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, RectangleF rectDestination, int graphicsUnit, ImageAttributes imageAttributes)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, int graphicsUnit)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, int graphicsUnit, ImageAttributes imageAttributes)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Rectangle rectDestination, int graphicsUnit)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Rectangle rectDestination, int graphicsUnit, ImageAttributes imageAttributes)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, int graphicsUnit)
      Draws the specified Image at the specified location and with the specified size.
      void drawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, int graphicsUnit, ImageAttributes imageAttributes)
      Draws the specified Image at the specified location and with the specified size.
      void drawImageUnscaled(Image sourceImage, int x, int y)
      Draws the specified image using its original physical size at the location specified by a coordinate pair.
      void drawImageUnscaled(Image sourceImage, int x, int y, int width, int height)
      Draws a specified image using its original physical size at a specified location.
      void drawImageUnscaled(Image sourceImage, Point point)
      Draws a specified image using its original physical size at a specified location.
      void drawImageUnscaled(Image sourceImage, Rectangle rect)
      Draws a specified image using its original physical size at a specified location.
      void drawImageUnscaledAndClipped(Image sourceImage, Rectangle rect)
      Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
      void drawLine(Pen pen, float x1, float y1, float x2, float y2)
      Draws a line connecting the two points specified by the coordinate pairs.
      void drawLine(Pen pen, int x1, int y1, int x2, int y2)
      Draws a line connecting the two points specified by the coordinate pairs.
      void drawLine(Pen pen, PointF point1, PointF point2)
      Draws a line connecting two PointF structures.
      void drawLine(Pen pen, Point point1, Point point2)
      Draws a line connecting two Point structures.
      void drawLines(Pen pen, Point[] points)
      Draws a series of line segments that connect an array of Point structures.
      void drawLines(Pen pen, PointF[] points)
      Draws a series of line segments that connect an array of PointF structures.
      void drawPath(Pen pen, GraphicsPath path)
      Draws a com.aspose.psd.graphicsPath.
      void drawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
      Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
      void drawPie(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)
      Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
      void drawPie(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
      Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
      void drawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
      Draws a pie shape defined by an ellipse specified by a Rectangle structure and two radial lines.
      void drawPolygon(Pen pen, Point[] points)
      Draws a polygon defined by an array of Point structures.
      void drawPolygon(Pen pen, PointF[] points)
      Draws a polygon defined by an array of PointF structures.
      void drawRectangle(Pen pen, float x, float y, float width, float height)
      Draws a rectangle specified by a coordinate pair, a width, and a height.
      void drawRectangle(Pen pen, int x, int y, int width, int height)
      Draws a rectangle specified by a coordinate pair, a width, and a height.
      void drawRectangle(Pen pen, Rectangle rect)
      Draws a rectangle specified by a Rectangle structure.
      void drawRectangle(Pen pen, RectangleF rect)
      Draws a rectangle specified by a RectangleF structure.
      void drawRectangles(Pen pen, Rectangle[] rects)
      Draws a series of rectangles specified by Rectangle structures.
      void drawRectangles(Pen pen, RectangleF[] rects)
      Draws a series of rectangles specified by RectangleF structures.
      void drawString(String s, Font font, Brush brush, float x, float y)
      Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects.
      void drawString(String s, Font font, Brush brush, float x, float y, StringFormat format)
      Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.
      void drawString(String s, Font font, Brush brush, PointF point)
      Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects.
      void drawString(String s, Font font, Brush brush, PointF point, StringFormat format)
      Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.
      void drawString(String s, Font font, Brush brush, RectangleF layoutRectangle)
      Draws the specified text string in the specified rectangle with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects.
      void drawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
      Draws the specified text string in the specified rectangle with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.
      void endUpdate()
      Finishes caching of the graphics operations started after BeginUpdate was called.
      void fillClosedCurve(Brush brush, Point[] points)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.Point structures.
      void fillClosedCurve(Brush brush, Point[] points, int fillmode)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.Point structures using the specified fill mode.
      void fillClosedCurve(Brush brush, Point[] points, int fillmode, float tension)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.Point structures using the specified fill mode and tension.
      void fillClosedCurve(Brush brush, PointF[] points)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.PointF structures.
      void fillClosedCurve(Brush brush, PointF[] points, int fillmode)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.PointF structures using the specified fill mode.
      void fillClosedCurve(Brush brush, PointF[] points, int fillmode, float tension)
      Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.PointF structures using the specified fill mode and tension.
      void fillEllipse(Brush brush, float x, float y, float width, float height)
      Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
      void fillEllipse(Brush brush, int x, int y, int width, int height)
      Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
      void fillEllipse(Brush brush, Rectangle rect)
      Fills the interior of an ellipse defined by a bounding rectangle specified by a com.aspose.psd.Rectangle structure.
      void fillEllipse(Brush brush, RectangleF rect)
      Fills the interior of an ellipse defined by a bounding rectangle specified by a com.aspose.psd.RectangleF structure.
      void fillPath(Brush brush, GraphicsPath path)
      Fills the interior of a com.aspose.psd.graphicsPath.
      void fillPie(Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
      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.
      void fillPie(Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle)
      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.
      void fillPie(Brush brush, RectangleF rect, float startAngle, float sweepAngle)
      Fills the interior of a pie section defined by an ellipse specified by a com.aspose.psd.RectangleF structure and two radial lines.
      void fillPie(Brush brush, Rectangle rect, float startAngle, float sweepAngle)
      Fills the interior of a pie section defined by an ellipse specified by a com.aspose.psd.RectangleF structure and two radial lines.
      void fillPolygon(Brush brush, Point[] points)
      Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.Point structures and FillMode.Alternate.
      void fillPolygon(Brush brush, Point[] points, int fillMode)
      Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.Point structures using the specified fill mode.
      void fillPolygon(Brush brush, PointF[] points)
      Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.PointF structures and FillMode.Alternate.
      void fillPolygon(Brush brush, PointF[] points, int fillMode)
      Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.PointF structures using the specified fill mode.
      void fillRectangle(Brush brush, float x, float y, float width, float height)
      Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
      void fillRectangle(Brush brush, int x, int y, int width, int height)
      Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
      void fillRectangle(Brush brush, Rectangle rect)
      Fills the interior of a rectangle specified by a Rectangle structure.
      void fillRectangle(Brush brush, RectangleF rect)
      Fills the interior of a rectangle specified by a RectangleF structure.
      void fillRectangles(Brush brush, Rectangle[] rects)
      Fills the interiors of a series of rectangles specified by Rectangle structures.
      void fillRectangles(Brush brush, RectangleF[] rects)
      Fills the interiors of a series of rectangles specified by RectangleF structures.
      void fillRegion(Brush brush, Region region)
      Fills the interior of a com.aspose.psd.region.
      Region getClip()
      Gets or sets the clip region.
      int getCompositingQuality()
      Gets or sets the compositing quality.
      float getDpiX()
      Gets the horizontal resolution of this com.aspose.psd.graphics.
      float getDpiY()
      Gets the vertical resolution of this com.aspose.psd.graphics.
      Image getImage()
      Gets the image.
      int getInterpolationMode()
      Gets or sets the interpolation mode.
      float getPageScale()
      Gets or sets the scaling between world units and page units for this com.aspose.psd.graphics.
      int getPageUnit()
      Gets or sets the unit of measure used for page coordinates in this com.aspose.psd.graphics.
      int getSmoothingMode()
      Gets or sets the smoothing mode.
      int getTextRenderingHint()
      Gets or sets the text rendering hint.
      Matrix getTransform()
      Gets or sets a copy of the geometric world transformation for this com.aspose.psd.graphics.
      boolean isInBeginUpdateCall()
      Gets a value indicating whether graphics is in BeginUpdate call state.
      void multiplyTransform(Matrix matrix)
      Multiplies the com.aspose.psd.Matrix that represents the local geometric transform of this com.aspose.psd.Graphics by the specified com.aspose.psd.Matrix by prepending the specified com.aspose.psd.matrix.
      void multiplyTransform(Matrix matrix, int order)
      Multiplies the com.aspose.psd.Matrix that represents the local geometric transform of this com.aspose.psd.Graphics by the specified com.aspose.psd.Matrix in the specified order.
      void resetTransform()
      Resets the com.aspose.psd.graphics.Transform property to identity.
      void rotateTransform(float angle)
      Rotates the local geometric transform by the specified amount.
      void rotateTransform(float angle, int order)
      Rotates the local geometric transform by the specified amount in the specified order.
      void scaleTransform(float sx, float sy)
      Scales the local geometric transform by the specified amounts.
      void scaleTransform(float sx, float sy, int order)
      Scales the local geometric transform by the specified amounts in the specified order.
      void setClip(Region value)
      Gets or sets the clip region.
      void setCompositingQuality(int value)
      Gets or sets the compositing quality.
      void setInterpolationMode(int value)
      Gets or sets the interpolation mode.
      void setPageScale(float value)
      Gets or sets the scaling between world units and page units for this com.aspose.psd.graphics.
      void setPageUnit(int value)
      Gets or sets the unit of measure used for page coordinates in this com.aspose.psd.graphics.
      void setSmoothingMode(int value)
      Gets or sets the smoothing mode.
      void setTextRenderingHint(int value)
      Gets or sets the text rendering hint.
      void setTransform(Matrix value)
      Gets or sets a copy of the geometric world transformation for this com.aspose.psd.graphics.
      void translateTransform(float dx, float dy)
      Translates the local geometric transform by the specified dimensions.
      void translateTransform(float dx, float dy, int order)
      Translates the local geometric transform by the specified dimensions in the specified order.
    • Constructor Detail

      • Graphics

        public Graphics(Image sourceImage)

        Initializes a new instance of the Graphics class.

        Parameters:
        sourceImage - The source image.
    • Method Detail

      • getDpiX

        public float getDpiX()

        Gets the horizontal resolution of this com.aspose.psd.graphics.

        Returns:
        The value, in dots per inch, for the horizontal resolution supported by this com.aspose.psd.graphics.
      • getDpiY

        public float getDpiY()

        Gets the vertical resolution of this com.aspose.psd.graphics.

        Returns:
        The value, in dots per inch, for the vertical resolution supported by this com.aspose.psd.graphics.
      • getPageUnit

        public int getPageUnit()

        Gets or sets the unit of measure used for page coordinates in this com.aspose.psd.graphics.

        Returns:
        The unit of measure used for page coordinates in this com.aspose.psd.graphics.
      • setPageUnit

        public void setPageUnit(int value)

        Gets or sets the unit of measure used for page coordinates in this com.aspose.psd.graphics.

        Parameters:
        value - The unit of measure used for page coordinates in this com.aspose.psd.graphics.
      • getPageScale

        public float getPageScale()

        Gets or sets the scaling between world units and page units for this com.aspose.psd.graphics.

        Returns:
        The scaling between world units and page units for this com.aspose.psd.graphics.
      • setPageScale

        public void setPageScale(float value)

        Gets or sets the scaling between world units and page units for this com.aspose.psd.graphics.

        Parameters:
        value - The scaling between world units and page units for this com.aspose.psd.graphics.
      • getClip

        public Region getClip()

        Gets or sets the clip region.

        Returns:
        The clip region.
      • setClip

        public void setClip(Region value)

        Gets or sets the clip region.

        Parameters:
        value - The clip region.
      • getTransform

        public Matrix getTransform()

        Gets or sets a copy of the geometric world transformation for this com.aspose.psd.graphics.

        Returns:
        A copy of the com.aspose.psd.Matrix that represents the geometric world transformation for this com.aspose.psd.graphics.
      • setTransform

        public void setTransform(Matrix value)

        Gets or sets a copy of the geometric world transformation for this com.aspose.psd.graphics.

        Parameters:
        value - A copy of the com.aspose.psd.Matrix that represents the geometric world transformation for this com.aspose.psd.graphics.
      • isInBeginUpdateCall

        public boolean isInBeginUpdateCall()

        Gets a value indicating whether graphics is in BeginUpdate call state.

        Returns:
        True if graphics is in BeginUpdate call state; otherwise, false.
      • getImage

        public Image getImage()

        Gets the image.

        Returns:
        The graphics image.
      • getCompositingQuality

        public int getCompositingQuality()

        Gets or sets the compositing quality.

        Returns:
        The compositing quality.
      • setCompositingQuality

        public void setCompositingQuality(int value)

        Gets or sets the compositing quality.

        Parameters:
        value - The compositing quality.
      • getInterpolationMode

        public int getInterpolationMode()

        Gets or sets the interpolation mode.

        Returns:
        The interpolation mode.
      • setInterpolationMode

        public void setInterpolationMode(int value)

        Gets or sets the interpolation mode.

        Parameters:
        value - The interpolation mode.
      • getSmoothingMode

        public int getSmoothingMode()

        Gets or sets the smoothing mode.

        Returns:
        The smoothing mode.
      • setSmoothingMode

        public void setSmoothingMode(int value)

        Gets or sets the smoothing mode.

        Parameters:
        value - The smoothing mode.
      • getTextRenderingHint

        public int getTextRenderingHint()

        Gets or sets the text rendering hint.

        Returns:
        The text rendering hint.
      • setTextRenderingHint

        public void setTextRenderingHint(int value)

        Gets or sets the text rendering hint.

        Parameters:
        value - The text rendering hint.
      • resetTransform

        public void resetTransform()

        Resets the com.aspose.psd.graphics.Transform property to identity.

      • multiplyTransform

        public void multiplyTransform(Matrix matrix)

        Multiplies the com.aspose.psd.Matrix that represents the local geometric transform of this com.aspose.psd.Graphics by the specified com.aspose.psd.Matrix by prepending the specified com.aspose.psd.matrix.

        Parameters:
        matrix - The com.aspose.psd.Matrix by which to multiply the geometric transform.
      • multiplyTransform

        public void multiplyTransform(Matrix matrix,
                                      int order)

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

        Parameters:
        matrix - The com.aspose.psd.Matrix by which to multiply the geometric transform.
        order - A com.aspose.psd.MatrixOrder that specifies in which order to multiply the two matrices.
      • translateTransform

        public void translateTransform(float dx,
                                       float dy)

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

        Parameters:
        dx - The value of the translation in x.
        dy - The value of the translation in y.
      • translateTransform

        public void translateTransform(float dx,
                                       float dy,
                                       int order)

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

        Parameters:
        dx - The value of the translation in x.
        dy - The value of the translation in y.
        order - The order (prepend or append) in which to apply the translation.
      • scaleTransform

        public void scaleTransform(float sx,
                                   float sy)

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

        Parameters:
        sx - The amount by which to scale the transform in the x-axis direction.
        sy - The amount by which to scale the transform in the y-axis direction.
      • scaleTransform

        public void scaleTransform(float sx,
                                   float sy,
                                   int order)

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

        Parameters:
        sx - The amount by which to scale the transform in the x-axis direction.
        sy - The amount by which to scale the transform in the y-axis direction.
        order - A com.aspose.psd.MatrixOrder that specifies whether to append or prepend the scaling matrix.
      • rotateTransform

        public void rotateTransform(float angle)

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

        Parameters:
        angle - The angle of rotation.
      • rotateTransform

        public void rotateTransform(float angle,
                                    int order)

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

        Parameters:
        angle - The angle of rotation.
        order - A com.aspose.psd.MatrixOrder that specifies whether to append or prepend the rotation matrix.
      • beginUpdate

        public void beginUpdate()

        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.

        Note the effects after BeginUpdate is called will not be applied in case EndUpdate is not called.

      • endUpdate

        public void endUpdate()

        Finishes caching of the graphics operations started after BeginUpdate was called. The preceding graphics operations will be applied at once when calling this method.

      • clear

        public void clear(Color color)

        Clears the graphics surface using the specified color.

        Parameters:
        color - The color to clear the graphics surface by.
      • drawLine

        public void drawLine(Pen pen,
                             Point point1,
                             Point point2)

        Draws a line connecting two Point structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the line.
        point1 - Point structure that represents the first point to connect.
        point2 - Point structure that represents the second point to connect.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawLine

        public void drawLine(Pen pen,
                             PointF point1,
                             PointF point2)

        Draws a line connecting two PointF structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the line.
        point1 - PointF structure that represents the first point to connect.
        point2 - PointF structure that represents the second point to connect.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawLine

        public void drawLine(Pen pen,
                             int x1,
                             int y1,
                             int x2,
                             int y2)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the line.
        x1 - The x-coordinate of the first point.
        y1 - The y-coordinate of the first point.
        x2 - The x-coordinate of the second point.
        y2 - The y-coordinate of the second point.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawLine

        public void drawLine(Pen pen,
                             float x1,
                             float y1,
                             float x2,
                             float y2)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the line.
        x1 - The x-coordinate of the first point.
        y1 - The y-coordinate of the first point.
        x2 - The x-coordinate of the second point.
        y2 - The y-coordinate of the second point.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawLines

        public void drawLines(Pen pen,
                              Point[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the line segments.
        points - Array of Point structures that represent the points to connect.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
        com.aspose.ms.System.ArgumentException - The points array contains less than 2 points.
      • drawLines

        public void drawLines(Pen pen,
                              PointF[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the line segments.
        points - Array of PointF structures that represent the points to connect.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
        com.aspose.ms.System.ArgumentException - The points array contains less than 2 points.
      • fillRectangle

        public void fillRectangle(Brush brush,
                                  Rectangle rect)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rect - Rectangle structure that represents the rectangle to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillRectangle

        public void fillRectangle(Brush brush,
                                  RectangleF rect)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rect - RectangleF structure that represents the rectangle to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillRectangle

        public void fillRectangle(Brush brush,
                                  float x,
                                  float y,
                                  float width,
                                  float height)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the rectangle to fill.
        y - The y-coordinate of the upper-left corner of the rectangle to fill.
        width - Width of the rectangle to fill.
        height - Height of the rectangle to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillRectangle

        public void fillRectangle(Brush brush,
                                  int x,
                                  int y,
                                  int width,
                                  int height)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the rectangle to fill.
        y - The y-coordinate of the upper-left corner of the rectangle to fill.
        width - Width of the rectangle to fill.
        height - Height of the rectangle to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillRectangles

        public void fillRectangles(Brush brush,
                                   Rectangle[] rects)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rects - Array of Rectangle structures that represent the rectangles to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null or rects is null.
      • fillRectangles

        public void fillRectangles(Brush brush,
                                   RectangleF[] rects)

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

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rects - Array of Rectangle structures that represent the rectangles to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null or rects is null.
      • drawRectangle

        public void drawRectangle(Pen pen,
                                  RectangleF rect)

        Draws a rectangle specified by a RectangleF structure.

        Parameters:
        pen - A Pen that determines the color, width, and style of the rectangle.
        rect - A RectangleF structure that represents the rectangle to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawRectangle

        public void drawRectangle(Pen pen,
                                  Rectangle rect)

        Draws a rectangle specified by a Rectangle structure.

        Parameters:
        pen - A Pen that determines the color, width, and style of the rectangle.
        rect - A Rectangle structure that represents the rectangle to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
        Code example:

        An example of saving a PSD file that contains a grayscale image with a border. The second part of the example tries to convert just saved PSD to PNG.


        String inPsdFilePath = "grayscale16bit.psd";
        String outPngFilePath = "grayscale16bit_output.png";
        String outPsdFilePath = "grayscale16bit_output.psd";
                    
        // Load a regular PSD file containing an image
        PsdImage psdImage = (PsdImage)Image.load(inPsdFilePath);
        try
        {
            RasterCachedImage rasterCachedImage = psdImage.getLayers()[0];
                    
            // Create a gray border around the image
            Graphics graphics = new Graphics(rasterCachedImage);
            int width = rasterCachedImage.getWidth();
            int height = rasterCachedImage.getHeight();
            Rectangle rectangle = new Rectangle(width / 3, height / 3,
                    width - (2 * (width / 3)) - 1, height - (2 * (height / 3)) - 1);
            graphics.drawRectangle(new Pen(Color.getDarkGray(), 1),  rectangle);
                    
            // Save the image in the grayscale color mode as a PSD file
            PsdOptions psdOptions = new PsdOptions();
            psdOptions.setColorMode(ColorModes.Grayscale);
            psdOptions.setChannelBitsCount((short)16);
            psdOptions.setChannelsCount((short)2);
            psdImage.save(outPsdFilePath, psdOptions);
        }
        finally
        {
            psdImage.dispose();
        }
                    
        // Load the previously saved PSD file containing a grayscale image
        PsdImage psdImage1 = (PsdImage)Image.load(outPsdFilePath); // should be no exception
        try
        {
            // Save the grayscale image as a PNG file with a white background
            PngOptions pngOptions = new PngOptions();
            pngOptions.setColorType(PngColorType.GrayscaleWithAlpha);
            psdImage1.save(outPngFilePath, pngOptions);
        }
        finally
        {
            psdImage1.dispose();
        }
        

      • drawRectangle

        public void drawRectangle(Pen pen,
                                  float x,
                                  float y,
                                  float width,
                                  float height)

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

        Parameters:
        pen - A Pen that determines the color, width, and style of the rectangle.
        x - The x-coordinate of the upper-left corner of the rectangle to draw.
        y - The y-coordinate of the upper-left corner of the rectangle to draw.
        width - The width of the rectangle to draw.
        height - The height of the rectangle to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawRectangle

        public void drawRectangle(Pen pen,
                                  int x,
                                  int y,
                                  int width,
                                  int height)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the rectangle.
        x - The x-coordinate of the upper-left corner of the rectangle to draw.
        y - The y-coordinate of the upper-left corner of the rectangle to draw.
        width - Width of the rectangle to draw.
        height - Height of the rectangle to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawRectangles

        public void drawRectangles(Pen pen,
                                   RectangleF[] rects)

        Draws a series of rectangles specified by RectangleF structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the outlines of the rectangles.
        rects - Array of RectangleF structures that represent the rectangles to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- rects is null.
      • drawRectangles

        public void drawRectangles(Pen pen,
                                   Rectangle[] rects)

        Draws a series of rectangles specified by Rectangle structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the outlines of the rectangles.
        rects - Array of Rectangle structures that represent the rectangles to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- rects is null.
      • drawEllipse

        public void drawEllipse(Pen pen,
                                RectangleF rect)

        Draws an ellipse defined by a bounding RectangleF.

        Parameters:
        pen - Pen that determines the color, width, and style of the ellipse.
        rect - RectangleF structure that defines the boundaries of the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawEllipse

        public void drawEllipse(Pen pen,
                                float x,
                                float y,
                                float width,
                                float height)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the ellipse.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        width - Width of the bounding rectangle that defines the ellipse.
        height - Height of the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawEllipse

        public void drawEllipse(Pen pen,
                                Rectangle rect)

        Draws an ellipse specified by a bounding Rectangle structure.

        Parameters:
        pen - Pen that determines the color, width, and style of the ellipse.
        rect - Rectangle structure that defines the boundaries of the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawEllipse

        public void drawEllipse(Pen pen,
                                int x,
                                int y,
                                int width,
                                int height)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the ellipse.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        width - Width of the bounding rectangle that defines the ellipse.
        height - Height of the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawPolygon

        public void drawPolygon(Pen pen,
                                PointF[] points)

        Draws a polygon defined by an array of PointF structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the polygon.
        points - Array of PointF structures that represent the vertices of the polygon.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawPolygon

        public void drawPolygon(Pen pen,
                                Point[] points)

        Draws a polygon defined by an array of Point structures.

        Parameters:
        pen - Pen that determines the color, width, and style of the polygon.
        points - Array of Point structures that represent the vertices of the polygon.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              PointF point)

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

        Parameters:
        sourceImage - The image to draw with.
        point - PointF structure that represents the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              float x,
                              float y)

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

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              RectangleF rect)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rect - RectangleF structure that specifies the location and size of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Rectangle rectDestination,
                              int graphicsUnit)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectDestination - The destination rectangle.
        graphicsUnit - The graphics unit.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              RectangleF rectDestination,
                              int graphicsUnit)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectDestination - The destination rectangle.
        graphicsUnit - The graphics unit.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Rectangle rectDestination,
                              int graphicsUnit,
                              ImageAttributes imageAttributes)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectDestination - The destination rectangle.
        graphicsUnit - The graphics unit.
        imageAttributes - The image attributes.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              RectangleF rectDestination,
                              int graphicsUnit,
                              ImageAttributes imageAttributes)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectDestination - The destination rectangle to draw in.
        graphicsUnit - The graphics unit.
        imageAttributes - The image attributes.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Rectangle rectSource,
                              Rectangle rectDestination,
                              int graphicsUnit)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectSource - The rect source.
        rectDestination - The rect destination.
        graphicsUnit - The graphics unit.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              RectangleF rectSource,
                              RectangleF rectDestination,
                              int graphicsUnit)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectSource - The rect source.
        rectDestination - The rect destination.
        graphicsUnit - The graphics unit.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Rectangle rectSource,
                              Rectangle rectDestination,
                              int graphicsUnit,
                              ImageAttributes imageAttributes)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectSource - The rect source.
        rectDestination - The rect destination.
        graphicsUnit - The graphics unit.
        imageAttributes - The image attributes.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              RectangleF rectSource,
                              RectangleF rectDestination,
                              int graphicsUnit,
                              ImageAttributes imageAttributes)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rectSource - The source rectangle.
        rectDestination - The destination rectangle.
        graphicsUnit - The graphics unit to use.
        imageAttributes - The image attributes to use.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image image,
                              Point[] destPoints)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
      • drawImage

        public void drawImage(Image image,
                              Point[] destPoints,
                              Rectangle srcRect)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
      • drawImage

        public void drawImage(Image image,
                              Point[] destPoints,
                              Rectangle srcRect,
                              int srcUnit)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
        srcUnit - The units of measure.
      • drawImage

        public void drawImage(Image image,
                              Point[] destPoints,
                              Rectangle srcRect,
                              int srcUnit,
                              ImageAttributes imageAttributes)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
        srcUnit - The units of measure.
        imageAttributes - The image attributes.
      • drawImage

        public void drawImage(Image image,
                              PointF[] destPoints)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        Throws:
        com.aspose.ms.System.ArgumentNullException - image
      • drawImage

        public void drawImage(Image image,
                              PointF[] destPoints,
                              RectangleF srcRect)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
      • drawImage

        public void drawImage(Image image,
                              PointF[] destPoints,
                              RectangleF srcRect,
                              int srcUnit)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
        srcUnit - The units of measure.
      • drawImage

        public void drawImage(Image image,
                              PointF[] destPoints,
                              RectangleF srcRect,
                              int srcUnit,
                              ImageAttributes imageAttributes)

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

        Parameters:
        image - The image to draw.
        destPoints - Array of three PointF structures that define a parallelogram.
        srcRect - The source rectangle.
        srcUnit - The units of measure.
        imageAttributes - The image attributes.
      • drawImage

        public void drawImage(Image sourceImage,
                              float x,
                              float y,
                              float width,
                              float height)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        width - Width of the drawn image.
        height - Height of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Point point)

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

        Parameters:
        sourceImage - The image to draw with.
        point - Point structure that represents the location of the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              int x,
                              int y)

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

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              Rectangle rect)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        rect - Rectangle structure that specifies the location and size of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImage

        public void drawImage(Image sourceImage,
                              int x,
                              int y,
                              int width,
                              int height)

        Draws the specified Image at the specified location and with the specified size.

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        width - Width of the drawn image.
        height - Height of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImageUnscaled

        public void drawImageUnscaled(Image sourceImage,
                                      Point point)

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

        Parameters:
        sourceImage - The image to draw with.
        point - Point structure that specifies the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImageUnscaled

        public void drawImageUnscaled(Image sourceImage,
                                      int x,
                                      int y)

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

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImageUnscaled

        public void drawImageUnscaled(Image sourceImage,
                                      Rectangle rect)

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

        Parameters:
        sourceImage - The image to draw with.
        rect - Rectangle 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.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImageUnscaled

        public void drawImageUnscaled(Image sourceImage,
                                      int x,
                                      int y,
                                      int width,
                                      int height)

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

        Parameters:
        sourceImage - The image to draw with.
        x - The x-coordinate of the upper-left corner of the drawn image.
        y - The y-coordinate of the upper-left corner of the drawn image.
        width - The parameter is not used.
        height - The parameter is not used.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawImageUnscaledAndClipped

        public void drawImageUnscaledAndClipped(Image sourceImage,
                                                Rectangle rect)

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

        Parameters:
        sourceImage - The image to draw with.
        rect - The Rectangle in which to draw the image.
        Throws:
        com.aspose.ms.System.ArgumentNullException - sourceImage is null.
      • drawArc

        public void drawArc(Pen pen,
                            float x,
                            float y,
                            float width,
                            float height,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the arc.
        x - The x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
        width - Width of the rectangle that defines the ellipse.
        height - Height of the rectangle that defines the ellipse.
        startAngle - Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawArc

        public void drawArc(Pen pen,
                            RectangleF rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the arc.
        rect - RectangleF structure that defines the boundaries of the ellipse.
        startAngle - Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null
      • drawArc

        public void drawArc(Pen pen,
                            int x,
                            int y,
                            int width,
                            int height,
                            int startAngle,
                            int sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the arc.
        x - The x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
        width - Width of the rectangle that defines the ellipse.
        height - Height of the rectangle that defines the ellipse.
        startAngle - Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawArc

        public void drawArc(Pen pen,
                            Rectangle rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the arc.
        rect - RectangleF structure that defines the boundaries of the ellipse.
        startAngle - Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawPie

        public void drawPie(Pen pen,
                            RectangleF rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the pie shape.
        rect - RectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
        startAngle - Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.
        sweepAngle - Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawPie

        public void drawPie(Pen pen,
                            float x,
                            float y,
                            float width,
                            float height,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the pie shape.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
        width - Width of the bounding rectangle that defines the ellipse from which the pie shape comes.
        height - Height of the bounding rectangle that defines the ellipse from which the pie shape comes.
        startAngle - Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.
        sweepAngle - Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawPie

        public void drawPie(Pen pen,
                            Rectangle rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the pie shape.
        rect - Rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
        startAngle - Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.
        sweepAngle - Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawPie

        public void drawPie(Pen pen,
                            int x,
                            int y,
                            int width,
                            int height,
                            int startAngle,
                            int sweepAngle)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the pie shape.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
        width - Width of the bounding rectangle that defines the ellipse from which the pie shape comes.
        height - Height of the bounding rectangle that defines the ellipse from which the pie shape comes.
        startAngle - Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.
        sweepAngle - Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              PointF[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              PointF[] points,
                              float tension)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that represent the points that define the curve.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              PointF[] points,
                              int offset,
                              int numberOfSegments)

        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:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that define the spline.
        offset - Offset from the first element in the array of the points parameter to the starting point in the curve.
        numberOfSegments - Number of segments after the starting point to include in the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              PointF[] points,
                              int offset,
                              int numberOfSegments,
                              float 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:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that define the spline.
        offset - Offset from the first element in the array of the points parameter to the starting point in the curve.
        numberOfSegments - Number of segments after the starting point to include in the curve.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              Point[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of Point structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              Point[] points,
                              float tension)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of Point structures that define the spline.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawCurve

        public void drawCurve(Pen pen,
                              Point[] points,
                              int offset,
                              int numberOfSegments,
                              float tension)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of Point structures that define the spline.
        offset - Offset from the first element in the array of the points parameter to the starting point in the curve.
        numberOfSegments - Number of segments after the starting point to include in the curve.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawClosedCurve

        public void drawClosedCurve(Pen pen,
                                    PointF[] 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:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawClosedCurve

        public void drawClosedCurve(Pen pen,
                                    PointF[] points,
                                    float 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:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of PointF structures that define the spline.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawClosedCurve

        public void drawClosedCurve(Pen pen,
                                    Point[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of Point structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawClosedCurve

        public void drawClosedCurve(Pen pen,
                                    Point[] points,
                                    float 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:
        pen - Pen that determines the color, width, and height of the curve.
        points - Array of Point structures that define the spline.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawBezier

        public void drawBezier(Pen pen,
                               float x1,
                               float y1,
                               float x2,
                               float y2,
                               float x3,
                               float y3,
                               float x4,
                               float y4)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the curve.
        x1 - The x-coordinate of the starting point of the curve.
        y1 - The y-coordinate of the starting point of the curve.
        x2 - The x-coordinate of the first control point of the curve.
        y2 - The y-coordinate of the first control point of the curve.
        x3 - The x-coordinate of the second control point of the curve.
        y3 - The y-coordinate of the second control point of the curve.
        x4 - The x-coordinate of the ending point of the curve.
        y4 - The y-coordinate of the ending point of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawBezier

        public void drawBezier(Pen pen,
                               PointF pt1,
                               PointF pt2,
                               PointF pt3,
                               PointF pt4)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the curve.
        pt1 - PointF structure that represents the starting point of the curve.
        pt2 - PointF structure that represents the first control point for the curve.
        pt3 - PointF structure that represents the second control point for the curve.
        pt4 - PointF structure that represents the ending point of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawBezier

        public void drawBezier(Pen pen,
                               Point pt1,
                               Point pt2,
                               Point pt3,
                               Point pt4)

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

        Parameters:
        pen - Pen structure that determines the color, width, and style of the curve.
        pt1 - Point structure that represents the starting point of the curve.
        pt2 - Point structure that represents the first control point for the curve.
        pt3 - Point structure that represents the second control point for the curve.
        pt4 - Point structure that represents the ending point of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null.
      • drawBeziers

        public void drawBeziers(Pen pen,
                                Point[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the curve.
        points - Array of Point structures that represent the points that determine the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawBeziers

        public void drawBeziers(Pen pen,
                                PointF[] points)

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

        Parameters:
        pen - Pen that determines the color, width, and style of the curve.
        points - Array of PointF structures that represent the points that determine the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- points is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               float x,
                               float y)

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

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        x - The x-coordinate of the upper-left corner of the drawn text.
        y - The y-coordinate of the upper-left corner of the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               PointF point)

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

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        point - com.aspose.psd.PointF structure that specifies the upper-left corner of the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               float x,
                               float y,
                               StringFormat format)

        Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        x - The x-coordinate of the upper-left corner of the drawn text.
        y - The y-coordinate of the upper-left corner of the drawn text.
        format - com.aspose.psd.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               PointF point,
                               StringFormat format)

        Draws the specified text string at the specified location with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        point - com.aspose.psd.PointF structure that specifies the upper-left corner of the drawn text.
        format - com.aspose.psd.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               RectangleF layoutRectangle)

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

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        layoutRectangle - com.aspose.psd.RectangleF structure that specifies the location of the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null.
      • drawString

        public void drawString(String s,
                               Font font,
                               Brush brush,
                               RectangleF layoutRectangle,
                               StringFormat format)

        Draws the specified text string in the specified rectangle with the specified com.aspose.psd.Brush and com.aspose.psd.Font objects using the formatting attributes of the specified com.aspose.psd.stringFormat.

        Parameters:
        s - String to draw.
        font - com.aspose.psd.Font that defines the text format of the string.
        brush - com.aspose.psd.Brush that determines the color and texture of the drawn text.
        layoutRectangle - com.aspose.psd.RectangleF structure that specifies the location of the drawn text.
        format - com.aspose.psd.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- s is null. -or- brush is null.
      • fillEllipse

        public void fillEllipse(Brush brush,
                                RectangleF rect)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        rect - com.aspose.psd.RectangleF structure that represents the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillEllipse

        public void fillEllipse(Brush brush,
                                float x,
                                float y,
                                float width,
                                float height)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        width - Width of the bounding rectangle that defines the ellipse.
        height - Height of the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillEllipse

        public void fillEllipse(Brush brush,
                                Rectangle rect)

        Fills the interior of an ellipse defined by a bounding rectangle specified by a com.aspose.psd.Rectangle structure.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        rect - com.aspose.psd.Rectangle structure that represents the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillEllipse

        public void fillEllipse(Brush brush,
                                int x,
                                int y,
                                int width,
                                int height)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
        width - Width of the bounding rectangle that defines the ellipse.
        height - Height of the bounding rectangle that defines the ellipse.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillPie

        public void fillPie(Brush brush,
                            Rectangle rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        rect - com.aspose.psd.Rectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
        startAngle - Angle in degrees measured clockwise from the x-axis to the first side of the pie section.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillPie

        public void fillPie(Brush brush,
                            RectangleF rect,
                            float startAngle,
                            float sweepAngle)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        rect - com.aspose.psd.RectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
        startAngle - Angle in degrees measured clockwise from the x-axis to the first side of the pie section.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillPie

        public void fillPie(Brush brush,
                            float x,
                            float y,
                            float width,
                            float height,
                            float startAngle,
                            float sweepAngle)

        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:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
        width - Width of the bounding rectangle that defines the ellipse from which the pie section comes.
        height - Height of the bounding rectangle that defines the ellipse from which the pie section comes.
        startAngle - Angle in degrees measured clockwise from the x-axis to the first side of the pie section.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillPie

        public void fillPie(Brush brush,
                            int x,
                            int y,
                            int width,
                            int height,
                            int startAngle,
                            int sweepAngle)

        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:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        x - The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
        y - The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
        width - Width of the bounding rectangle that defines the ellipse from which the pie section comes.
        height - Height of the bounding rectangle that defines the ellipse from which the pie section comes.
        startAngle - Angle in degrees measured clockwise from the x-axis to the first side of the pie section.
        sweepAngle - Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null.
      • fillPolygon

        public void fillPolygon(Brush brush,
                                PointF[] points)

        Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.PointF structures and FillMode.Alternate.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.PointF structures that represent the vertices of the polygon to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillPolygon

        public void fillPolygon(Brush brush,
                                PointF[] points,
                                int fillMode)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.PointF structures that represent the vertices of the polygon to fill.
        fillMode - Member of the com.aspose.psd.FillMode enumeration that determines the style of the fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillPolygon

        public void fillPolygon(Brush brush,
                                Point[] points)

        Fills the interior of a polygon defined by an array of points specified by com.aspose.psd.Point structures and FillMode.Alternate.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.Point structures that represent the vertices of the polygon to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillPolygon

        public void fillPolygon(Brush brush,
                                Point[] points,
                                int fillMode)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.Point structures that represent the vertices of the polygon to fill.
        fillMode - Member of the com.aspose.psd.FillMode enumeration that determines the style of the fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    PointF[] points)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.PointF structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    PointF[] points,
                                    int fillmode)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.PointF structures that define the spline.
        fillmode - Member of the com.aspose.psd.FillMode enumeration that determines how the curve is filled.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    PointF[] points,
                                    int fillmode,
                                    float tension)

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

        Parameters:
        brush - A com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.PointF structures that define the spline.
        fillmode - Member of the com.aspose.psd.FillMode enumeration that determines how the curve is filled.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    Point[] points)

        Fills the interior of a closed cardinal spline curve defined by an array of com.aspose.psd.Point structures. This method uses a default tension of 0.5 and FillMode.Alternate fill mode.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.Point structures that define the spline.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    Point[] points,
                                    int fillmode)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.Point structures that define the spline.
        fillmode - Member of the com.aspose.psd.FillMode enumeration that determines how the curve is filled.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • fillClosedCurve

        public void fillClosedCurve(Brush brush,
                                    Point[] points,
                                    int fillmode,
                                    float tension)

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

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        points - Array of com.aspose.psd.Point structures that define the spline.
        fillmode - Member of the com.aspose.psd.FillMode enumeration that determines how the curve is filled.
        tension - Value greater than or equal to 0.0F that specifies the tension of the curve.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- points is null.
      • drawPath

        public void drawPath(Pen pen,
                             GraphicsPath path)

        Draws a com.aspose.psd.graphicsPath.

        Parameters:
        pen - com.aspose.psd.Pen that determines the color, width, and style of the path.
        path - com.aspose.psd.GraphicsPath to draw.
        Throws:
        com.aspose.ms.System.ArgumentNullException - pen is null. -or- path is null.
      • fillPath

        public void fillPath(Brush brush,
                             GraphicsPath path)

        Fills the interior of a com.aspose.psd.graphicsPath.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        path - com.aspose.psd.GraphicsPath that represents the path to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- path is null.
      • fillRegion

        public void fillRegion(Brush brush,
                               Region region)

        Fills the interior of a com.aspose.psd.region.

        Parameters:
        brush - com.aspose.psd.Brush that determines the characteristics of the fill.
        region - com.aspose.psd.Region that represents the area to fill.
        Throws:
        com.aspose.ms.System.ArgumentNullException - brush is null. -or- region is null.