Packages

 

com.aspose.imaging.fileformats.emf.graphics

Class MetafileRecorderGraphics2D

  • java.lang.Object
    • com.aspose.imaging.fileformats.emf.graphics.MetafileRecorderGraphics2D
    • Constructor Detail

      • MetafileRecorderGraphics2D

        public MetafileRecorderGraphics2D()
    • Method Detail

      • getClip

        public Region getClip()

        Gets or sets a Region that limits the drawing region of this Graphics

        Returns:
        The clip region.
      • setClip

        public void setClip(Region value)

        Gets or sets a Region that limits the drawing region of this Graphics

        Parameters:
        value - The clip region.
      • getClipBounds

        public RectangleF getClipBounds()

        Gets the clip bounds.

        Returns:
        The clip bounds.
      • getBackgroundColor

        public Color getBackgroundColor()

        Gets the color of the background.

        Returns:
        The color of the background.
      • setBackgroundColor

        public void setBackgroundColor(Color value)

        Sets the color of the background.

        Parameters:
        value - The color of the background.
      • clear

        public void clear()

        Clears the state of the graphics object

      • drawArc

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

        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 figure.
        rect - The boundaries of the ellipse.
        startAngle - Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
        arcAngle - Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.
      • drawCubicBezier

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

        Draws the cubic bezier.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        pt1 - The starting point of the curve.
        pt2 - The first control point for the curve.
        pt3 - The second control point for the curve.
        pt4 - The ending point of the curve.
      • drawPolyCubicBezier

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

        Draws the poly cubic bezier.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        points - The points.
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.
      • drawEllipse

        public void drawEllipse(Pen pen,
                                Rectangle rect)

        Draws the ellipse.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        rect - The boundaries of the ellipse.
      • fillEllipse

        public void fillEllipse(Brush brush,
                                Rectangle rect)

        Fills the ellipse.

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rect - The boundaries of the ellipse.
      • drawImage

        public void drawImage(RasterImage image,
                              Point location)

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

        Parameters:
        image - The image to draw.
        location - The location of the upper-left corner of the drawn image.
      • drawImage

        public final void drawImage(byte[] imageBytes,
                                    Rectangle destRect,
                                    int srcUnit)

        Draws the image.

        Parameters:
        imageBytes - The image bytes.
        destRect - The dest rect.
        srcUnit - The source unit.
      • drawImage

        public void drawImage(RasterImage image,
                              Rectangle destRect,
                              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.
        destRect - Rectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
        srcRect - Rectangle structure that specifies the portion of the image object to draw.
        srcUnit - The units of measure used by the srcRect parameter.
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - srcUnit;Support only Pixel unit
      • drawLine

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

        Draws the line.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        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.
      • drawLine

        public void drawLine(Pen pen,
                             Point pt1,
                             Point pt2)

        Draws the line.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        pt1 - The first point.
        pt2 - The second point.
      • drawPolyline

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

        Draws the polyline.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        points - The points.
      • drawPath

        public void drawPath(Pen pen,
                             GraphicsPath path)

        Draws the path.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        path - The path to draw.
      • fillPath

        public void fillPath(Pen pen,
                             Brush brush,
                             GraphicsPath path)

        Fills the path.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        brush - Brush that determines the characteristics of the fill.
        path - The path to fill.
      • drawPie

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

        Draws the pie.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        rect - 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.
      • fillPie

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

        Fills the pie.

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rect - 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.
      • drawPolygon

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

        Draws the polygon.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        points - The points.
      • fillPolygon

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

        Fills the polygon.

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        points - The points.
      • fillPolygon

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

        Fills the polygon.

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        points - The points.
        fillMode - The fill mode.
      • drawRectangle

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

        Draws the rectangle.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        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.
      • drawRectangle

        public void drawRectangle(Pen pen,
                                  Rectangle rectangle)

        Draws the rectangle.

        Parameters:
        pen - Pen that determines the color, width, and style of the figure.
        rectangle - The rectangle to draw.
      • fillRectangle

        public void fillRectangle(Brush brush,
                                  Rectangle rectangle)

        Fills the rectangle.

        Parameters:
        brush - Brush that determines the characteristics of the fill.
        rectangle - The rectangle to fill.
      • drawString

        public void drawString(String string,
                               Font font,
                               Color color,
                               int x,
                               int y)

        Draws the string.

        Parameters:
        string - The string.
        font - Font that defines the text format of the string.
        color - The text color.
        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.
      • drawString

        public void drawString(String string,
                               Font font,
                               Color color,
                               int x,
                               int y,
                               float angle)

        Draws the string.

        Parameters:
        string - The string.
        font - Font that defines the text format of the string.
        color - The text color.
        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.
        angle - The angle in degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text.
      • excludeClip

        public void excludeClip(Rectangle rect)

        Updates the clip region of this Graphics to exclude the area specified by a Rectangle structure.

        Parameters:
        rect - Rectangle structure that specifies the rectangle to exclude from the clip region.
      • excludeClip

        public void excludeClip(Region region)

        Updates the clip region of this Graphics to exclude the area specified by a Region.

        Parameters:
        region - Region that specifies the region to exclude from the clip region.
      • intersectClip

        public void intersectClip(RectangleF rect)

        Updates the clip region of this Graphics to the intersection of the current clip region and the specified Rectangle structure.

        Parameters:
        rect - Rectangle structure to intersect with the current clip region.
      • intersectClip

        public void intersectClip(Region region)

        Updates the clip region of this Graphics to the intersection of the current clip region and the specified Region.

        Parameters:
        region - Region to intersect with the current region.
      • resetClip

        public void resetClip()

        Resets the clip.

      • multiplyTransform

        public void multiplyTransform(Matrix matrix)

        Multiplies the world transformation of this Graphics and specified the Matrix.

        Parameters:
        matrix - The matrix that multiplies the world transformation.
      • multiplyTransform

        public void multiplyTransform(Matrix matrix,
                                      int order)

        Multiplies the world transformation of this Graphics and specified the Matrix in the specified order.

        Parameters:
        matrix - The matrix that multiplies the world transformation.
        order - The order of the multiplication.
      • translateTransform

        public void translateTransform(float x,
                                       float y)

        Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this Graphics.

        Parameters:
        x - The x-coordinate of the translation.
        y - The y-coordinate of the translation.
      • translateTransform

        public void translateTransform(float x,
                                       float y,
                                       int order)

        Changes the origin of the coordinate system by applying the specified translation to the transformation matrix of this Graphics in the specified order.

        Parameters:
        x - The x-coordinate of the translation.
        y - The y-coordinate of the translation.
        order - Specifies whether the translation is prepended or appended to the transformation matrix.
      • rotateTransform

        public void rotateTransform(float angle)

        Applies the specified rotation to the transformation matrix of this Graphics.

        Parameters:
        angle - Angle of rotation in degrees.
      • rotateTransform

        public void rotateTransform(float angle,
                                    PointF center,
                                    int order)

        Applies the specified rotation to the transformation matrix of this Graphics in the specified order.

        Parameters:
        angle - Angle of rotation in degrees.
        center - The rotating center.
        order - Specifies whether the rotation is appended or prepended to the matrix transformation..
      • scaleTransform

        public void scaleTransform(float sx,
                                   float sy)

        Applies the specified scaling operation to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.

        Parameters:
        sx - Scale factor in the x direction.
        sy - Scale factor in the y direction.
      • scaleTransform

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

        Applies the specified scaling operation to the transformation matrix of this Graphics in the specified order.

        Parameters:
        sx - Scale factor in the x direction.
        sy - Scale factor in the y direction.
        order - Specifies whether the scaling operation is prepended or appended to the transformation matrix.
      • getTransform

        public Matrix getTransform()

        Gets the world transform.

        Returns:
        The transform matrix.
      • setTransform

        public void setTransform(Matrix transform)

        Sets the transform.

        Parameters:
        transform - The new transform matrix.