View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Line Styles

    by , 03-06-2012 at 09:01 PM
    Stroke attributes define the line style in Graphic2D rendering context. BasicStroke object shall be created and passed to Graphic2D setStroke method so that to set the stroke attribute.

    Information in a BasicStroke object is:

    • Line width
    • Join style
    • End cap style
    • Dash style

    Use this information when shape is rendered with draw method.

    The line width is line thickness which is measured perpendicular, to its trajectory. The line width ...
    Tags: line styles Add / Edit Tags