MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / renderPage

Method renderPage

src/org/albite/albite/PageCanvas.java:57–76  ·  view source on GitHub ↗
(final ColorScheme cp)

Source from the content-addressed store, hash-verified

55 }
56
57 public final void renderPage(final ColorScheme cp) {
58
59 final int color_bg = cp.colors[ColorScheme.COLOR_BACKGROUND];
60
61 final Image img = (BUFFER == null ? canvas : BUFFER);
62
63 final Graphics g = img.getGraphics();
64 final int w = img.getWidth();
65 final int h = img.getHeight();
66
67 g.setColor(color_bg);
68 g.fillRect(0, 0, w, h);
69
70 //#debug
71 AlbiteMIDlet.LOGGER.log("Drawing background on " + (BUFFER == null ? "canvas" : "BUFFER") + " from (0, 0) to (" + w + ", " + h + ") " + "using the colour " + Integer.toHexString(color_bg));
72
73 page.draw(g, cp);
74
75 renderRotate(img);
76 }
77
78 public final void renderPageSelected(
79 final ColorScheme cp,

Callers 4

loadPrevPageMethod · 0.95
loadNextPageMethod · 0.95
renderPagesMethod · 0.80

Calls 6

renderRotateMethod · 0.95
setColorMethod · 0.80
logMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected