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

Method paint

src/org/albite/albite/BookCanvas.java:419–527  ·  view source on GitHub ↗
(final Graphics g)

Source from the content-addressed store, hash-verified

417 }
418
419 protected final void paint(final Graphics g) {
420 if (mode != MODE_DONT_RENDER) {
421 final int w = getWidth();
422 final int h = getHeight();
423
424 if (orientation == ORIENTATION_0) {
425 //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport)
426 if (!fullscreen && repaintButtons) {
427 drawButtons(w, h, g);
428 }
429 //#endif
430
431 if (repaintStatusBar) {
432 repaintStatusBar = false;
433
434 g.setColor(currentScheme.colors[
435 ColorScheme.COLOR_BACKGROUND]);
436
437 g.fillRect(0, h - statusBarHeight, w, statusBarHeight);
438
439 drawChapterNum(w, h, g);
440 drawProgressBar(w, h, g);
441 drawClock(w, h, g);
442 } else {
443 /* If not the whole status bar is to be updated,
444 check if parts of it are
445 */
446
447 if (repaintChapterNum) {
448 drawChapterNum(w, h, g);
449 }
450
451 if (repaintProgressBar) {
452 drawProgressBar(w, h, g);
453 }
454
455 if (repaintClock) {
456 drawClock(w, h, g);
457 }
458 }
459 }
460
461 final int anchor = Graphics.TOP | Graphics.LEFT;
462
463 final Image imageC = currentPageCanvas.getImage();
464 final Image imageP = prevPageCanvas.getImage();
465 final Image imageN = nextPageCanvas.getImage();
466
467 final int imageWidth = imageC.getWidth();
468 final int imageHeight = imageC.getHeight();
469
470 int x = 0;
471 int y = 0;
472
473 switch(orientation) {
474 case ORIENTATION_0:
475
476 if (fullscreen) {

Callers

nothing calls this directly

Calls 9

drawButtonsMethod · 0.95
drawChapterNumMethod · 0.95
drawProgressBarMethod · 0.95
drawClockMethod · 0.95
setColorMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45
getImageMethod · 0.45
drawRotatedMethod · 0.45

Tested by

no test coverage detected