# Class VulkanPipelineColorBlendAttachmentState

java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineColorBlendAttachmentState

All Implemented Interfaces:
  `VulkanPipelineColorBlendAttachmentStateType`

public final class VulkanPipelineColorBlendAttachmentState extends Object implements VulkanPipelineColorBlendAttachmentStateType
Structure specifying a pipeline color blend attachment state.

See Also:
  - "VkPipelineColorBlendAttachmentState"

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanPipelineColorBlendAttachmentState.Builder`
  Builds instances of type `VulkanPipelineColorBlendAttachmentState`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanBlendOp`
  `alphaBlendOp()`
  `static VulkanPipelineColorBlendAttachmentState.Builder`
  `builder()`
  Creates a builder for `VulkanPipelineColorBlendAttachmentState`.
  `VulkanBlendOp`
  `colorBlendOp()`
  `Set<VulkanColorComponentFlag>`
  `colorWriteMask()`
  `static VulkanPipelineColorBlendAttachmentState`
  `copyOf(VulkanPipelineColorBlendAttachmentStateType instance)`
  Creates an immutable copy of a `VulkanPipelineColorBlendAttachmentStateType` value.
  `VulkanBlendFactor`
  `dstAlphaBlendFactor()`
  `VulkanBlendFactor`
  `dstColorBlendFactor()`
  `boolean`
  `enable()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanPipelineColorBlendAttachmentState` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `enable`, `srcColorBlendFactor`, `dstColorBlendFactor`, `colorBlendOp`, `srcAlphaBlendFactor`, `dstAlphaBlendFactor`, `alphaBlendOp`, `colorWriteMask`.
  `VulkanBlendFactor`
  `srcAlphaBlendFactor()`
  `VulkanBlendFactor`
  `srcColorBlendFactor()`
  `String`
  `toString()`
  Prints the immutable value `VulkanPipelineColorBlendAttachmentState` with attribute values.
  `final VulkanPipelineColorBlendAttachmentState`
  `withAlphaBlendOp(VulkanBlendOp value)`
  Copy the current immutable object by setting a value for the `alphaBlendOp` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withColorBlendOp(VulkanBlendOp value)`
  Copy the current immutable object by setting a value for the `colorBlendOp` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withColorWriteMask(VulkanColorComponentFlag... elements)`
  Copy the current immutable object with elements that replace the content of `colorWriteMask`.
  `final VulkanPipelineColorBlendAttachmentState`
  `withColorWriteMask(Iterable<VulkanColorComponentFlag> elements)`
  Copy the current immutable object with elements that replace the content of `colorWriteMask`.
  `final VulkanPipelineColorBlendAttachmentState`
  `withDstAlphaBlendFactor(VulkanBlendFactor value)`
  Copy the current immutable object by setting a value for the `dstAlphaBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withDstColorBlendFactor(VulkanBlendFactor value)`
  Copy the current immutable object by setting a value for the `dstColorBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withEnable(boolean value)`
  Copy the current immutable object by setting a value for the `enable` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withSrcAlphaBlendFactor(VulkanBlendFactor value)`
  Copy the current immutable object by setting a value for the `srcAlphaBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState`
  `withSrcColorBlendFactor(VulkanBlendFactor value)`
  Copy the current immutable object by setting a value for the `srcColorBlendFactor` attribute.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### enable

    public boolean enable()
    Specified by:
      `enable` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      `true` if blending is enabled for the corresponding color attachment. If blending is not enabled, the source fragment’s color for that attachment is passed through unmodified.

  - ### srcColorBlendFactor

    public VulkanBlendFactor srcColorBlendFactor()
    Specified by:
      `srcColorBlendFactor` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend factor used to determine the source factors (Sr,Sg,Sb).

  - ### dstColorBlendFactor

    public VulkanBlendFactor dstColorBlendFactor()
    Specified by:
      `dstColorBlendFactor` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend factor used to determine the destination factors (Dr,Dg,Db).

  - ### colorBlendOp

    public VulkanBlendOp colorBlendOp()
    Specified by:
      `colorBlendOp` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend operation used to calculate the RGB values to write to the color attachment.

  - ### srcAlphaBlendFactor

    public VulkanBlendFactor srcAlphaBlendFactor()
    Specified by:
      `srcAlphaBlendFactor` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend factor used to determine the source factor Sa.

  - ### dstAlphaBlendFactor

    public VulkanBlendFactor dstAlphaBlendFactor()
    Specified by:
      `dstAlphaBlendFactor` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend factor used to determine the destination factor Da.

  - ### alphaBlendOp

    public VulkanBlendOp alphaBlendOp()
    Specified by:
      `alphaBlendOp` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the blend operation used to calculate the alpha values to write to the color attachment.

  - ### colorWriteMask

    public Set<VulkanColorComponentFlag> colorWriteMask()
    Specified by:
      `colorWriteMask` in interface `VulkanPipelineColorBlendAttachmentStateType`
    Returns:
      the R, G, B, and/or A components enabled for writing.

  - ### withEnable

    public final VulkanPipelineColorBlendAttachmentState withEnable(boolean value)
    Copy the current immutable object by setting a value for the `enable` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for enable
    Returns:
      A modified copy or the `this` object

  - ### withSrcColorBlendFactor

    public final VulkanPipelineColorBlendAttachmentState withSrcColorBlendFactor(VulkanBlendFactor value)
    Copy the current immutable object by setting a value for the `srcColorBlendFactor` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for srcColorBlendFactor
    Returns:
      A modified copy or the `this` object

  - ### withDstColorBlendFactor

    public final VulkanPipelineColorBlendAttachmentState withDstColorBlendFactor(VulkanBlendFactor value)
    Copy the current immutable object by setting a value for the `dstColorBlendFactor` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for dstColorBlendFactor
    Returns:
      A modified copy or the `this` object

  - ### withColorBlendOp

    public final VulkanPipelineColorBlendAttachmentState withColorBlendOp(VulkanBlendOp value)
    Copy the current immutable object by setting a value for the `colorBlendOp` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for colorBlendOp
    Returns:
      A modified copy or the `this` object

  - ### withSrcAlphaBlendFactor

    public final VulkanPipelineColorBlendAttachmentState withSrcAlphaBlendFactor(VulkanBlendFactor value)
    Copy the current immutable object by setting a value for the `srcAlphaBlendFactor` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for srcAlphaBlendFactor
    Returns:
      A modified copy or the `this` object

  - ### withDstAlphaBlendFactor

    public final VulkanPipelineColorBlendAttachmentState withDstAlphaBlendFactor(VulkanBlendFactor value)
    Copy the current immutable object by setting a value for the `dstAlphaBlendFactor` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for dstAlphaBlendFactor
    Returns:
      A modified copy or the `this` object

  - ### withAlphaBlendOp

    public final VulkanPipelineColorBlendAttachmentState withAlphaBlendOp(VulkanBlendOp value)
    Copy the current immutable object by setting a value for the `alphaBlendOp` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for alphaBlendOp
    Returns:
      A modified copy or the `this` object

  - ### withColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState withColorWriteMask(VulkanColorComponentFlag... elements)
    Copy the current immutable object with elements that replace the content of `colorWriteMask`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState withColorWriteMask(Iterable<VulkanColorComponentFlag> elements)
    Copy the current immutable object with elements that replace the content of `colorWriteMask`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of colorWriteMask elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanPipelineColorBlendAttachmentState` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `enable`, `srcColorBlendFactor`, `dstColorBlendFactor`, `colorBlendOp`, `srcAlphaBlendFactor`, `dstAlphaBlendFactor`, `alphaBlendOp`, `colorWriteMask`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `VulkanPipelineColorBlendAttachmentState` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static VulkanPipelineColorBlendAttachmentState copyOf(VulkanPipelineColorBlendAttachmentStateType instance)
    Creates an immutable copy of a `VulkanPipelineColorBlendAttachmentStateType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable VulkanPipelineColorBlendAttachmentState instance

  - ### builder

    public static VulkanPipelineColorBlendAttachmentState.Builder builder()
    Creates a builder for `VulkanPipelineColorBlendAttachmentState`.

        VulkanPipelineColorBlendAttachmentState.builder()
           .setEnable(boolean) // optional enable
           .setSrcColorBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optional srcColorBlendFactor
           .setDstColorBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optional dstColorBlendFactor
           .setColorBlendOp(com.io7m.jcoronado.api.VulkanBlendOp) // optional colorBlendOp
           .setSrcAlphaBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optional srcAlphaBlendFactor
           .setDstAlphaBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optional dstAlphaBlendFactor
           .setAlphaBlendOp(com.io7m.jcoronado.api.VulkanBlendOp) // optional alphaBlendOp
           .addColorWriteMask|addAllColorWriteMask(com.io7m.jcoronado.api.VulkanColorComponentFlag) // colorWriteMask elements
           .build();

    Returns:
      A new VulkanPipelineColorBlendAttachmentState builder