//==============================================================================
void LufsPluginEditor::paint (juce::Graphics& g)
{
    DEBUGPLUGIN_output("LufsPluginEditor::paint");

    g.fillAll( LUFS_COLOR_BACKGROUND );

    juce::Font lufsFont( 36.f );
    lufsFont.setBold(true);
    g.setFont( lufsFont );
    g.setColour( LUFS_COLOR_FONT );

    int x = 10;
    const int width = 120;
    const int height = 60;
    g.setColour( COLOR_LUFSTIME );
    g.drawFittedText( juce::String( "LUFS" ), x, 10, width, 40, juce::Justification::centred, 1, 0.01f );
    x += width;

    juce::Font font( 18.f );
    font.setBold(true);
    g.setFont( font );

    g.setColour( COLOR_MOMENTARY );
    g.drawFittedText( juce::String( "Momentary" ), x, height, width, 20, juce::Justification::centred, 1, 0.01f );
    x += width;
    g.setColour( COLOR_SHORTTERM );
    g.drawFittedText( juce::String( "Short term" ), x, height, width, 20, juce::Justification::centred, 1, 0.01f );
    x += width;
    g.setColour( COLOR_INTEGRATED );
    g.drawFittedText( juce::String( "Integrated" ), x, height, width, 20, juce::Justification::centred, 1, 0.01f );
    x += width;
    g.setColour( COLOR_RANGE );
    g.drawFittedText( juce::String( "Range" ), x, height, width, 20, juce::Justification::centred, 1, 0.01f );
}
void InterfaceComponent::paintListBoxItem (const int rowNumber,
                                           juce::Graphics& g,
                                           const int width, const int height,
                                           const bool isRowSelected)
{
    if (isRowSelected)
    {
        g.fillAll (juce::Colours::white.darker());
        g.setColour (juce::Colours::white.darker().contrasting());
    }
    else
    {
        g.setColour (fileListBox.findColour (juce::ListBox::textColourId));
    }

    g.setFont (height * 0.7f);

    g.drawText (files[rowNumber],
                5, 0, width, height,
                juce::Justification::centredLeft, false);

    const float h = (float) height;
    const float w = (float) width;
    const float offset = 5.0f;
    const float thickness = 0.25f;

    g.setColour (juce::Colours::lightgrey);

    g.drawLine (offset, h - thickness,
                w - (offset * 2.0f), h - thickness,
                thickness);
}
void OscOutputManagerHeaderComponent::paint(juce::Graphics &g)
{
	g.setColour( AddictLookAndFeel::getBackgroundColour() );
	g.fillAll();
	g.setColour( AddictLookAndFeel::getOutlineColour() );
	g.drawLine( 0.0f, float(getHeight()), float(getWidth()), float(getHeight()));
}
void NTLookAndFeel::drawLabel(juce::Graphics &g, juce::Label &label){
    g.fillAll (label.findColour (Label::backgroundColourId));
    
    if (! label.isBeingEdited())
    {
        const float alpha = label.isEnabled() ? 1.0f : 0.5f;
        const Font font (getLabelFont (label));
        
        g.setColour (label.findColour (Label::textColourId).withMultipliedAlpha (alpha));
        g.setFont (font);
        
        Rectangle<int> textArea (label.getBorderSize().subtractedFrom (label.getLocalBounds()));
        
        g.drawFittedText (label.getText(), textArea, label.getJustificationType(),
                          jmax (1, (int) (textArea.getHeight() / font.getHeight())),
                          label.getMinimumHorizontalScale());
        
        g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha));
    }
    else if (label.isEnabled())
    {
        g.setColour (label.findColour (Label::outlineColourId));
    }
    
    g.drawRect (label.getLocalBounds(),2);
}
void CpuRegistersComponent::paint(juce::Graphics& g)
{
	g.fillAll(juce::Colours::white);

	g.setColour(juce::Colours::orange);
	g.drawRect(getLocalBounds(), 1);
}
void NTLookAndFeel::drawButtonBackground(juce::Graphics &g, juce::Button &button, const juce::Colour &backgroundColour,
                                         bool isMouseOverButton, bool isButtonDown){
    
	if (isMouseOverButton && !isButtonDown) {

		g.fillAll(Colour{ uint8(240),uint8(240),uint8(240) });

	}
	else if (isMouseOverButton && isButtonDown) {

		g.fillAll(Colour{ uint8(225),uint8(225),uint8(225) });

	}
	else {
		g.fillAll(Colours::white);
	}
	g.setColour(Colours::lightgrey);
	g.drawRect(0, 0, button.getWidth(), button.getHeight(), 2);

    
}
Exemple #7
0
void MainComponent::paint (juce::Graphics& g)
{
    g.fillAll (juce::Colours::white);
    belle::JUCE::Properties JUCESpecificProperties;
    JUCESpecificProperties.GraphicsContext = &g;
    JUCESpecificProperties.ComponentContext = this;
    JUCESpecificProperties.IndexOfCanvas = 0;
    JUCESpecificProperties.PageDimensions = belle::Inches(8.5f, 11.f);
    JUCESpecificProperties.PageVisibility = belle::BoxInt(0, 0, getWidth(), getHeight());
    JUCESpecificProperties.PageArea = belle::BoxInt(0, 0, getWidth(), getHeight());
    score->Create<belle::JUCE>(JUCESpecificProperties);
}
void NTLookAndFeel::drawComboBox(juce::Graphics &g, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, juce::ComboBox &box){
    g.fillAll (box.findColour (ComboBox::backgroundColourId));
    
    const Colour buttonColour (box.findColour (ComboBox::buttonColourId));
    g.setColour (Colours::lightgrey);
    g.drawRect (0, 0, width, height,2);

    
    Path p;

    
    
    int xEnd = (buttonX+buttonW) - buttonW/3;
    int midPointX = (buttonX + xEnd)/2.f;

    int yStart = buttonY + buttonH/3;
    int yEnd = (buttonY + buttonH ) - buttonH/3;
    p.addTriangle (buttonX, yStart,
                   xEnd ,yStart,
                   midPointX,yEnd);
    
    g.setColour (Colours::lightgrey);
    g.fillPath (p);
}
Exemple #9
0
void MainContentComponent::paint(juce::Graphics& g) { //-V2009 overridden method
  g.fillAll(juce::Colours::white);
}
//==============================================================================
void InterfaceComponent::paint (juce::Graphics& g)
{
    g.fillAll (juce::Colours::darkgrey);
}
 void Main::paint(juce::Graphics &g)
 {
     g.fillAll(Colours::darkgrey);
 }
void Oscilloscope::paint(juce::Graphics &g)
{
    g.fillAll (Colours::white);
    
    Path path;
    
    float xOffset = 21.f;
    float yOffset = 120.f;
    
    Rectangle<float> rect = logoPath.getBounds();
    Rectangle<int> rect2 = getLocalBounds();
    
    g.setColour (Colours::black);
    g.fillPath (logoPath, RectanglePlacement (RectanglePlacement::stretchToFit)
                .getTransformToFit (logoPath.getBounds(),
                                    getLocalBounds().toFloat()));
    

    // Horizontal zero line.
    path.addLineSegment(Line<float> (xOffset, yOffset, getLocalBounds().getWidth() - xOffset, yOffset), 1.);
    
    g.setColour (Colours::lightgrey);
    g.fillPath (path);
    
    float xIncrement = (getLocalBounds().getWidth() - 2 * xOffset) / (UIConstants::NUMBER_SCOPE_POINTS - 1);
    
    // Now iterate over points.
    int count = 0;
    float alpha = 0;
    for (auto& points : allPoints)
    {
        if ((currentPointsIndex - count + UIConstants::NUMBER_SCOPE_BUFFERS) % UIConstants::NUMBER_SCOPE_BUFFERS == 0)
        {
            // Current array is 'brightest'
            alpha = 1;
        } else
        {
            // Set older immediately to less than 0.5 alpha.
            alpha = 0.3 - ((currentPointsIndex - count + UIConstants::NUMBER_SCOPE_BUFFERS) % UIConstants::NUMBER_SCOPE_BUFFERS) * 0.03 ;
        }
        
//        g.setColour(Colour::fromFloatRGBA(0, 255 , 0, alpha)) ;
        g.setColour(scopeTraceColour.withAlpha(alpha));
        path.clear();

        float x = 0;
        path.startNewSubPath(xOffset, yOffset);
        for (auto& point : points)
        {
//            g.setPixel(x + xOffset, yOffset - 30 * point.x); // point.x in this case is the right value of the stereo pair.
            path.lineTo(x + xOffset, yOffset - 30 * point.x);
            x += xIncrement;
        }
//        path.closeSubPath();
        g.strokePath (path, PathStrokeType (1.0f));
        count++;
        
    }

    
}
void ComponentChooser::paint(juce::Graphics& g)
{
    g.fillAll(Colour(255, 255, 255));
}
Exemple #14
0
void WizardFinish::paint(juce::Graphics& g)
{
    g.fillAll(Colour(255, 255, 255));
}
Exemple #15
0
void WidgetsManager::paint(juce::Graphics& g) {
  g.fillAll(Colours::white);
}
void ConvolutionMatrixComponent::paint(juce::Graphics& g) {
    g.fillAll(juce::Colours::darkgrey);
}
void PlaybackPane::paint(juce::Graphics& g) {
    g.fillAll(juce::Colours::darkgrey);
}