org.apache.poi.hwmf.record

## Class HwmfPenStyle

- java.lang.Object
- - org.apache.poi.hwmf.record.HwmfPenStyle

- All Implemented Interfaces:
    Duplicatable, GenericRecord
  Direct Known Subclasses:
    HemfPenStyle

      public class HwmfPenStyle
      extends java.lang.Object
      implements Duplicatable, GenericRecord

  The 16-bit PenStyle Enumeration is used to specify different types of pens that can be used in graphics operations. Various styles can be combined by using a logical OR statement, one from each subsection of Style, EndCap, Join, and Type (Cosmetic). The defaults in case the other values of the subsection aren't set are solid, round end caps, round joins and cosmetic type.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HwmfPenStyle.HwmfLineCap`
    `static class` | `HwmfPenStyle.HwmfLineDash`
    `static class` | `HwmfPenStyle.HwmfLineJoin`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `flag`
    `protected static BitField` | `SUBSECTION_ALTERNATE`
    `protected static BitField` | `SUBSECTION_DASH`
    `protected static BitField` | `SUBSECTION_ENDCAP`
    `protected static BitField` | `SUBSECTION_GEOMETRIC`
    `protected static BitField` | `SUBSECTION_JOIN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HwmfPenStyle(HwmfPenStyle other)`
    `HwmfPenStyle(int flag)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HwmfPenStyle` | `copy()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `HwmfPenStyle.HwmfLineCap` | `getLineCap()`
    `HwmfPenStyle.HwmfLineDash` | `getLineDash()`
    `float[]` | `getLineDashes()` Convienence method which should be used instead of accessing `HwmfPenStyle.HwmfLineDash.dashes` directly, so an subclass can provide user-style dashes
    `HwmfPenStyle.HwmfLineJoin` | `getLineJoin()`
    `boolean` | `isAlternateDash()` The pen sets every other pixel (this style is applicable only for cosmetic pens).
    `boolean` | `isGeometric()` A pen type that specifies a line with a width that is measured in logical units and a style that can contain any of the attributes of a brush.
    `java.lang.String` | `toString()`
    `static HwmfPenStyle` | `valueOf(int flag)`

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

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

    - ### Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord

      `getGenericChildren, getGenericRecordType`

- - ### Field Detail

    - #### SUBSECTION_DASH

          protected static final BitField SUBSECTION_DASH

    - #### SUBSECTION_ALTERNATE

          protected static final BitField SUBSECTION_ALTERNATE

    - #### SUBSECTION_ENDCAP

          protected static final BitField SUBSECTION_ENDCAP

    - #### SUBSECTION_JOIN

          protected static final BitField SUBSECTION_JOIN

    - #### SUBSECTION_GEOMETRIC

          protected static final BitField SUBSECTION_GEOMETRIC

    - #### flag

          protected int flag

  - ### Constructor Detail

    - #### HwmfPenStyle

          public HwmfPenStyle(int flag)

    - #### HwmfPenStyle

          public HwmfPenStyle(HwmfPenStyle other)

  - ### Method Detail

    - #### valueOf

          public static HwmfPenStyle valueOf(int flag)

    - #### getLineCap

          public HwmfPenStyle.HwmfLineCap getLineCap()

    - #### getLineJoin

          public HwmfPenStyle.HwmfLineJoin getLineJoin()

    - #### getLineDash

          public HwmfPenStyle.HwmfLineDash getLineDash()

    - #### getLineDashes

          public float[] getLineDashes()

      Convienence method which should be used instead of accessing `HwmfPenStyle.HwmfLineDash.dashes` directly, so an subclass can provide user-style dashes
      Returns:
        the dash pattern

    - #### isAlternateDash

          public boolean isAlternateDash()

      The pen sets every other pixel (this style is applicable only for cosmetic pens).

    - #### isGeometric

          public boolean isGeometric()

      A pen type that specifies a line with a width that is measured in logical units and a style that can contain any of the attributes of a brush.

    - #### copy

          public HwmfPenStyle copy()

      Specified by:
        `copy` in interface `Duplicatable`
      Returns:
        a deep copy of the implementing class / instance

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getGenericProperties

          public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.