void OscillatorSection::paintBackground(Graphics& g) { static const float extra_knob_padding = 4.0f; static const DropShadow component_shadow(Colour(0x99000000), 3, Point<int>(0, 1)); SynthSection::paintBackground(g); g.setColour(Colour(0xff212121)); g.fillEllipse(transpose_1_->getBounds().toFloat().expanded(extra_knob_padding)); g.fillEllipse(tune_1_->getBounds().toFloat().expanded(extra_knob_padding)); g.fillEllipse(transpose_2_->getBounds().toFloat().expanded(extra_knob_padding)); g.fillEllipse(tune_2_->getBounds().toFloat().expanded(extra_knob_padding)); g.setColour(Colour(0xff303030)); g.fillRect(0, tune_1_->getBottom() + 2, getWidth(), 5); g.setColour(Colour(0xff4fc3f7)); g.strokePath(top_left_cross_path_, PathStrokeType(1.0f)); g.setColour(Colour(0xff4fc3f7)); g.strokePath(top_right_cross_path_, PathStrokeType(1.0f)); g.setColour(Colour(0xff4fc3f7)); g.strokePath(bottom_left_cross_path_, PathStrokeType(1.0f)); g.setColour(Colour(0xff4fc3f7)); g.strokePath(bottom_right_cross_path_, PathStrokeType(1.0f)); g.setColour(Colour(0xffbbbbbb)); g.setFont(Fonts::getInstance()->proportional_regular().withPointHeight(10.0f)); drawTextForComponent(g, TRANS("MOD"), cross_modulation_); drawTextForComponent(g, TRANS("TRANS"), transpose_1_); drawTextForComponent(g, TRANS("TRANS"), transpose_2_); drawTextForComponent(g, TRANS("TUNE"), tune_1_); drawTextForComponent(g, TRANS("TUNE"), tune_2_); drawTextForComponent(g, TRANS("UNISON"), unison_detune_1_); drawTextForComponent(g, TRANS("UNISON"), unison_detune_2_); component_shadow.drawForRectangle(g, wave_viewer_1_->getBounds()); component_shadow.drawForRectangle(g, wave_viewer_2_->getBounds()); g.setColour(Colour(0xff424242)); paintKnobShadows(g); }
void FullInterface::paintBackground(Graphics& g) { static const DropShadow shadow(Colour(0xcc000000), 3, Point<int>(0, 1)); static const DropShadow logo_shadow(Colour(0xff000000), 8, Point<int>(0, 0)); static const DropShadow component_shadow(Colour(0xcc000000), 5, Point<int>(0, 1)); static Font roboto_reg(Typeface::createSystemTypefaceFor(BinaryData::RobotoRegular_ttf, BinaryData::RobotoRegular_ttfSize)); static Font roboto_light(Typeface::createSystemTypefaceFor(BinaryData::RobotoLight_ttf, BinaryData::RobotoLight_ttfSize)); static const Image helm_small = ImageCache::getFromMemory(BinaryData::helm_icon_32_2x_png, BinaryData::helm_icon_32_2x_pngSize); g.setColour(Colour(0xff212121)); g.fillRect(getLocalBounds()); shadow.drawForRectangle(g, arp_section_->getBounds()); shadow.drawForRectangle(g, global_tool_tip_->getBounds()); shadow.drawForRectangle(g, oscilloscope_->getBounds()); shadow.drawForRectangle(g, Rectangle<int>(92, 8, 244, TOP_HEIGHT)); shadow.drawForRectangle(g, Rectangle<int>(16, 8, 68, 64)); g.setColour(Colour(0xff303030)); g.fillRoundedRectangle(16.0f, 8.0f, 68.0f, 64.0f, 3.0f); g.saveState(); g.setOrigin(18, 8); logo_shadow.drawForImage(g, helm_small); g.restoreState(); g.setColour(Colour(0xff303030)); g.fillRect(92, 8, 244, TOP_HEIGHT); g.setColour(Colour(0xffbbbbbb)); g.setFont(roboto_reg.withPointHeight(10.0f)); g.drawText(TRANS("BPM"), patch_selector_->getX(), beats_per_minute_->getY(), 44, beats_per_minute_->getHeight(), Justification::centred, false); component_shadow.drawForRectangle(g, patch_selector_->getBounds()); paintKnobShadows(g); }
void SynthSection::paintBackground(Graphics& g) { static const DropShadow button_shadow(Colour(0xff000000), 3, Point<int>(0, 0)); static Font title_font(Typeface::createSystemTypefaceFor(BinaryData::RobotoLight_ttf, BinaryData::RobotoLight_ttfSize)); paintContainer(g); // Draw shadow divider. float shadow_top = TITLE_WIDTH - SHADOW_WIDTH; float shadow_bottom = TITLE_WIDTH; g.setGradientFill(ColourGradient(Colour(0x22000000), 0.0f, shadow_top, Colour(0x66000000), 0.0f, shadow_bottom, false)); g.fillRoundedRectangle(0, 0, getWidth(), TITLE_WIDTH, 1.0f); // Draw text title. g.setColour(Colour(0xff999999)); g.setFont(title_font.withPointHeight(14.0f)); g.drawText(TRANS(getName()), 0, 0, getWidth(), TITLE_WIDTH, Justification::centred, true); paintKnobShadows(g); }