Class RenderingAttributeFactory


  • public final class RenderingAttributeFactory
    extends java.lang.Object
    A factory class that creates rendering attributes that are suitable for particular Styles. Using the factory ensures that rendering effects will be consistent for all PageItems.
    Since:
    3.0
    Author:
    Chris Jennings
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Stroke createLineStroke​(LineStyle style)
      Create a stroke for drawing lines and other path elements.
      static java.awt.Stroke createOutlineStroke​(OutlineStyle style)
      Create a stroke for drawing shape outlines.
      static java.awt.Stroke createStroke​(float width, LineCap cap, LineJoin join, DashPattern dashPattern)
      Create a stroke from the specified drawing attributes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createLineStroke

        public static java.awt.Stroke createLineStroke​(LineStyle style)
        Create a stroke for drawing lines and other path elements.
        Parameters:
        style - the style to create a stroke for
        Returns:
        a suitable Stroke for drawing
      • createOutlineStroke

        public static java.awt.Stroke createOutlineStroke​(OutlineStyle style)
        Create a stroke for drawing shape outlines.
        Parameters:
        style - the style to create a stroke for
        Returns:
        a suitable Stroke for drawing
      • createStroke

        public static java.awt.Stroke createStroke​(float width,
                                                   LineCap cap,
                                                   LineJoin join,
                                                   DashPattern dashPattern)
        Create a stroke from the specified drawing attributes.
        Parameters:
        width - the stroke width
        cap - the line cap style
        join - the line join style
        dashPattern - the dash pattern style
        Returns:
        a stroke for the specified attributes