public class Printer extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
Printer.BeamPoint |
Modifier and Type | Field and Description |
---|---|
protected Set<Integer> |
completeBeams |
protected int |
debugLevel |
protected Graphics2D |
gr |
protected int |
pageNum |
protected Pager |
pager |
protected Map<Integer,Set<Printer.BeamPoint>> |
pendingBeamGroups |
protected float |
xmargin |
Constructor and Description |
---|
Printer(Pager pager,
Graphics2D gr) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
do_print(Renderer.NoteSystem ns) |
(package private) void |
do_print(Renderer.NoteSystem ns,
Renderer.RunningPrefix p) |
protected void |
drawBeams()
ASSUME that not Stems NOT in Beamgroup lie between stems IN Beamgroup
(with same direction)
|
protected void |
drawBeams(Set<Printer.BeamPoint> beams)
ATTENTION combination of up AND down stems at the same beam (="knees")
NOT YET SUPPORTED.
|
(package private) void |
drawBeamSegment(float startx,
float starty,
float slope,
float fromx,
float tox,
float ytop,
float ybottom) |
protected void |
drawExtension(Extension ext,
float xpos,
float ypos,
Color col,
boolean frameNotCross) |
Graphics2D |
gr() |
void |
needsBeaming(TimedObject to,
float xpos,
float ypos,
float lineWidth,
Stem stem,
boolean isUp) |
void |
print(int pageNum,
int debugLevel) |
protected void |
printBarLine(Renderer.NoteSystem ns,
Renderer.RunningPrefix p,
int pos,
BarLine bl,
Renderer.Measure measure,
float xpos)
Calculate top and bottom y position form staves crossed by
a particular bar line.
|
static void |
xdraw(Graphics2D gr,
float x0,
float y0,
float x1,
float y1) |
protected final Graphics2D gr
protected final Pager pager
protected int pageNum
protected int debugLevel
protected float xmargin
protected Map<Integer,Set<Printer.BeamPoint>> pendingBeamGroups
public Printer(Pager pager, Graphics2D gr)
public void print(int pageNum, int debugLevel)
void do_print(Renderer.NoteSystem ns)
void do_print(Renderer.NoteSystem ns, Renderer.RunningPrefix p)
protected void printBarLine(Renderer.NoteSystem ns, Renderer.RunningPrefix p, int pos, BarLine bl, Renderer.Measure measure, float xpos)
protected void drawBeams()
protected void drawBeams(Set<Printer.BeamPoint> beams)
void drawBeamSegment(float startx, float starty, float slope, float fromx, float tox, float ytop, float ybottom)
public Graphics2D gr()
public void needsBeaming(TimedObject to, float xpos, float ypos, float lineWidth, Stem stem, boolean isUp)
protected void drawExtension(Extension ext, float xpos, float ypos, Color col, boolean frameNotCross)
public static void xdraw(Graphics2D gr, float x0, float y0, float x1, float y1)