MCPcopy Index your code
hub / github.com/benfry/processing4 / draw

Method draw

app/src/processing/app/ui/EditorFooter.java:399–421  ·  view source on GitHub ↗
(Graphics2D g2)

Source from the content-addressed store, hash-verified

397 }
398
399 void draw(Graphics2D g2) {
400 int state = isCurrent() ? SELECTED : ENABLED;
401 g2.setColor(tabColor[state]);
402 g2.fill(Toolkit.createRoundRect(left, TAB_TOP, right, TAB_BOTTOM, 0, 0,
403 CURVE_RADIUS, CURVE_RADIUS));
404// isLast() ? CURVE_RADIUS : 0,
405// isFirst() ? CURVE_RADIUS : 0));
406
407 if (hasIcon()) {
408 Image icon = (isCurrent() || notification) ? selectedIcon : enabledIcon;
409 g2.drawImage(icon, left + MARGIN, ICON_TOP, ICON_WIDTH, ICON_HEIGHT, null);
410 }
411
412 int textLeft = getTextLeft();
413 if (notification && state == ENABLED) {
414 g2.setColor(textColor[SELECTED]);
415 } else {
416 g2.setColor(textColor[state]);
417 }
418 int tabHeight = TAB_BOTTOM - TAB_TOP;
419 int baseline = TAB_TOP + (tabHeight + fontAscent) / 2;
420 g2.drawString(title, textLeft, baseline);
421 }
422 }
423}

Callers 2

paintComponentMethod · 0.45
drawTabsMethod · 0.45

Calls 7

isCurrentMethod · 0.95
createRoundRectMethod · 0.95
hasIconMethod · 0.95
getTextLeftMethod · 0.95
setColorMethod · 0.45
fillMethod · 0.45
drawStringMethod · 0.45

Tested by

no test coverage detected