128

Controlling appearance
LineAttributes example code

  • Create LineAttributes to set the line width, pattern, and anti-aliasing
    LineAttributes myLA = new LineAttributes( );
    myLA.setLineWidth( 10.0f );
    myLA.setLinePattern( LineAttributes.PATTERN_SOLID );
    myLA.setLineAntialiasingEnable( true );
  • Create Appearance, set the line attributes, and assemble the shape
    Appearance myAppear = new Appearance( );
    myAppear.setLineAttributes( myLA );
    Shape3D myShape = new Shape3D( myGeom, myAppear );