Class HwmfPenStyle

java.lang.Object
org.apache.poi.hwmf.record.HwmfPenStyle
All Implemented Interfaces:
org.apache.poi.common.Duplicatable, GenericRecord
Direct Known Subclasses:
HemfPenStyle

public class HwmfPenStyle extends Object implements org.apache.poi.common.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.
  • Constructor Details

    • HwmfPenStyle

      public HwmfPenStyle(int flag)
    • HwmfPenStyle

      public HwmfPenStyle(HwmfPenStyle other)
  • Method Details

    • 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 org.apache.poi.common.Duplicatable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getGenericProperties

      public Map<String,Supplier<?>> getGenericProperties()
      Specified by:
      getGenericProperties in interface GenericRecord