Package ej.microvg

## Class VectorImageBuilder

- java.lang.Object
- - ej.microvg.VectorImageBuilder

-     @Deprecated
      public class VectorImageBuilder
      extends Object

  Deprecated.
  Use a `BufferedVectorImage` instead.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `VectorImageBuilder​(float width, float height)` | Deprecated. Creates a new builder for vector images.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `VectorImageBuilder` | `addGradientPath​(Path path, LinearGradient gradient, VectorGraphicsPainter.FillType fillType)` | Deprecated. Adds the given path with specified gradient and fill type.
    `VectorImageBuilder` | `addPath​(Path path, int color, VectorGraphicsPainter.FillType fillType)` | Deprecated. Adds the given path with specified color and fill type.
    `ResourceVectorImage` | `build()` | Deprecated. Creates the vector image from the builder state.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VectorImageBuilder

          public VectorImageBuilder​(float width,
                                    float height)

      Deprecated.
      Creates a new builder for vector images.
      Parameters:
        `width` - the width of the image
        `height` - the height of the image
      Throws:
        `IllegalArgumentException` - if either `width` or `height` is negative or zero.

  - ### Method Detail

    - #### addPath

          public VectorImageBuilder addPath​(Path path,
                                            int color,
                                            VectorGraphicsPainter.FillType fillType)

      Deprecated.
      Adds the given path with specified color and fill type.

      The given color value is interpreted as a 32-bit ARGB color, where the high-order byte is the alpha channel and the remaining bytes contain the red, green and blue channels, respectively. A fully opaque color will have an alpha of `255`, while a fully transparent color will have an alpha of `0`. For example, passing the color `0xff0000ff` to this method results in a path with an opaque blue fill.

      If the specified color is fully transparent (`0x00` for the alpha channel), the path is not added.

      Parameters:
        `path` - the path to add
        `color` - the color to fill the path with
        `fillType` - the fill type to use
      Returns:
        the builder instance.
      See Also:
        `GraphicsContext.OPAQUE`, `GraphicsContext.TRANSPARENT`

    - #### addGradientPath

          public VectorImageBuilder addGradientPath​(Path path,
                                                    LinearGradient gradient,
                                                    VectorGraphicsPainter.FillType fillType)

      Deprecated.
      Adds the given path with specified gradient and fill type.

      The colors of the gradient are interpreted as 32-bit ARGB colors, where the high-order byte is the alpha channel and the remaining bytes contain the red, green and blue channels, respectively. A fully opaque color will have an alpha of `255`, while a fully transparent color will have an alpha of `0`. For example, the color `0xff0000ff` results in an opaque blue.

      Parameters:
        `path` - the path to add
        `gradient` - the gradient to fill the path with
        `fillType` - the fill type to use
      Returns:
        the builder instance.
      See Also:
        `GraphicsContext.OPAQUE`, `GraphicsContext.TRANSPARENT`

    - #### build

          public ResourceVectorImage build()

      Deprecated.
      Creates the vector image from the builder state.

      The returned image is allocated dynamically and must be closed explicitly.

      Returns:
        a vector image