uk.ac.starlink.ttools.plot2.layer
Class LineGlyph

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.LineGlyph
All Implemented Interfaces:
Glyph

public abstract class LineGlyph
extends Object
implements Glyph

Glyph that represents a line from the origin to a given X,Y position.

Since:
25 Nov 2013
Author:
Mark Taylor

Field Summary
static Glyph POINT
          Glyph that paints a single pixel at the origin.
 
Constructor Summary
protected LineGlyph(int x, int y)
          Constructor.
 
Method Summary
static Glyph getLineGlyph(int x, int y)
          Returns a glyph to draw a line from the origin to a given point x, y.
 void paintGlyph(Graphics g)
          Paints a representation of a point considered to be at the origin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.ttools.plot2.Glyph
createPixer
 

Field Detail

POINT

public static Glyph POINT
Glyph that paints a single pixel at the origin.

Constructor Detail

LineGlyph

protected LineGlyph(int x,
                    int y)
Constructor. In most cases, external users should use one of the factory methods rather than extend this class.

Method Detail

paintGlyph

public void paintGlyph(Graphics g)
Description copied from interface: Glyph
Paints a representation of a point considered to be at the origin. Typically this means the painting is centred at that point.

Specified by:
paintGlyph in interface Glyph
Parameters:
g - graphics context

getLineGlyph

public static Glyph getLineGlyph(int x,
                                 int y)
Returns a glyph to draw a line from the origin to a given point x, y.

Parameters:
x - X destination coordinate
y - Y destination coordinate
Returns:
line glyph


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.