//==============================================================================
void DRowAudioEditorComponent::paint (Graphics& g)
{
	Colour backgroundColour(0xFF455769);

	g.setColour(backgroundColour);
	g.fillRoundedRectangle(0, 0, getWidth(), getHeight(), 10);
	
	ColourGradient topHighlight(Colours::white.withAlpha(0.3f),
								0, 0,
								Colours::white.withAlpha(0.0f),
								0, 0 + 15,
								false);
	
	GradientBrush topBrush(topHighlight);
	g.setBrush(&topBrush);
	g.fillRoundedRectangle(0, 0, getWidth(), 30, 10);	
	
	GradientBrush outlineGradient(Colours::white,
								  0, 00,
								  backgroundColour.withBrightness(0.5f),
								  0, 20,
								  false);
	g.setBrush(&outlineGradient);
	g.drawRoundedRectangle(0, 0, getWidth(), getHeight(), 10, 1.0f);
	
}
Example #2
0
//==============================================================================
TheEarPluginAudioProcessorEditor::TheEarPluginAudioProcessorEditor (TheEarPluginAudioProcessor& owner)
    : AudioProcessorEditor (owner),
    mainTab(owner.keyboardState, processor)


{
    Colour backgroundColour(154, 32, 32);
    Colour purpleColour(170, 165, 190);
    Colour mainColour(135, 205, 222);
    Colour greyOne(55, 69, 72);
    Colour greyTwo(28, 31, 36);

    
//    lookAndFeel.setColour(MainTab::ColourIds::backgroundColourId, backgroundColour);
    lookAndFeel.setColour(Label::ColourIds::textColourId, mainColour);
    lookAndFeel.setColour(TextButton::ColourIds::buttonColourId, mainColour);
    lookAndFeel.setColour(TextButton::ColourIds::textColourOffId, greyOne);
    lookAndFeel.setColour(TextButton::ColourIds::textColourOnId, greyTwo);
    lookAndFeel.setColour(ToggleButton::ColourIds::textColourId, mainColour);

    setLookAndFeel(&lookAndFeel);
    
    addAndMakeVisible(mainTab);
    setSize(800, 700);
}
Example #3
0
//==============================================================================
void TheEarPluginAudioProcessorEditor::paint (Graphics& g)
{
//    g.setGradientFill (ColourGradient (Colours::white, 0, 0,
//                                       Colours::grey, 0, (float) getHeight(), false));
    
    Colour backgroundColour(28, 31, 36);
    g.fillAll(backgroundColour);
}
Example #4
0
bool DTViewSymbol::paint()
//------------------------
{
    WPoint loc( _fileNameR.r.x(), _fileNameR.r.y() );
    drawText( loc, _fileText.gets(), ColorBlack, backgroundColour() );

    return _descPaint->paint();
}
Example #5
0
MainWindow::MainWindow(QWidget *parent)
    : QDialog(parent)
    , mEditActionDialog(0)
{
    setupUi(this);

    QColor grayedOutColour(actions_TV->palette().color(actions_TV->foregroundRole()));
    QColor backgroundColour(actions_TV->palette().color(actions_TV->backgroundRole()));
    grayedOutColour.toHsl();
    backgroundColour.toHsl();
    grayedOutColour.setHslF(grayedOutColour.hslHueF(), grayedOutColour.hslSaturationF(), (grayedOutColour.lightnessF() + backgroundColour.lightnessF() * 3) / 4.0);
    grayedOutColour.toRgb();

    QFont highlightedFont(actions_TV->font());
    QFont italicFont(actions_TV->font());
    QFont highlightedItalicFont(actions_TV->font());
    highlightedFont.setBold(!highlightedFont.bold());
    italicFont.setItalic(!italicFont.italic());
    highlightedItalicFont.setItalic(!highlightedItalicFont.italic());
    highlightedItalicFont.setBold(!highlightedItalicFont.bold());

    mActions = new Actions(this);
    mDefaultModel = new DefaultModel(mActions, grayedOutColour, highlightedFont, italicFont, highlightedItalicFont, this);
    mSortFilterProxyModel = new QSortFilterProxyModel(this);

    mSortFilterProxyModel->setSourceModel(mDefaultModel);
    actions_TV->setModel(mSortFilterProxyModel);

    mSelectionModel = new QItemSelectionModel(actions_TV->model());
    actions_TV->setSelectionModel(mSelectionModel);

    actions_TV->setItemDelegateForColumn(1, new ShortcutDelegate(mActions, this));

    connect(mSelectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(selectionChanged(QItemSelection, QItemSelection)));

    connect(mActions, SIGNAL(daemonDisappeared()), SLOT(daemonDisappeared()));
    connect(mActions, SIGNAL(daemonAppeared()), SLOT(daemonAppeared()));
    connect(mActions, SIGNAL(multipleActionsBehaviourChanged(MultipleActionsBehaviour)), SLOT(multipleActionsBehaviourChanged(MultipleActionsBehaviour)));
}
void drawNetloaderBackground() {
    rgbColour * bgc = backgroundColour();

    gfxFillColor(GFX_BOTTOM, GFX_LEFT, (u8[]){bgc->r, bgc->g, bgc->b});
    gfxFillColor(GFX_TOP, GFX_LEFT, (u8[]){bgc->r, bgc->g, bgc->b});

    //Wallpaper
    if (themeImageExists(themeImageTopWallpaperInfo)) {
        drawThemeImage(themeImageTopWallpaperInfo, GFX_TOP, 0, 0);
    }
    else if (themeImageExists(themeImageTopWallpaper)) {
        drawThemeImage(themeImageTopWallpaper, GFX_TOP, 0, 0);
    }

    if (themeImageExists(themeImageBottomWallpaperNonGrid)) {
        drawThemeImage(themeImageBottomWallpaperNonGrid, GFX_BOTTOM, 0, 0);
    }

    else if (themeImageExists(themeImageBottomWallpaper)) {
        drawThemeImage(themeImageBottomWallpaper, GFX_BOTTOM, 0, 0);
    }

    drawStatusBar(wifiStatus, charging, batteryLevel);
}
Example #7
0
void wxCaret::DoDraw(wxDC *dc, wxWindow* win)
{
    wxPen pen(*wxBLACK_PEN);
    wxBrush brush(*wxBLACK_BRUSH);
    if (win)
    {
        wxColour backgroundColour(win->GetBackgroundColour());
        if (backgroundColour.Red() < 100 &&
            backgroundColour.Green() < 100 &&
            backgroundColour.Blue() < 100)
        {
            pen = *wxWHITE_PEN;
            brush = *wxWHITE_BRUSH;
        }
    }
    dc->SetPen( pen );
    dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH);

    // VZ: unfortunately, the rectangle comes out a pixel smaller when this is
    //     done under wxGTK - no idea why
    //dc->SetLogicalFunction(wxINVERT);

    dc->DrawRectangle(m_x, m_y, m_width, m_height);
}
Example #8
0
	Vector3d traceRay(Ray* ray, vector<SceneObject*>* objects, vector<SceneObject*>* lights, int remainingDepth) {
		Vector3d backgroundColour(0, 0, 0);
		Vector3d ambientLight(25, 25, 25);

		/*Vector3d RED(255, 0, 0);
		Vector3d GREEN(0, 255, 0);
		Vector3d BLUE(255, 0, 255);
		Vector3d YELLOW(255, 255, 0);
		Vector3d CYAN(0, 255, 255);
		Vector3d MAJENTA(255, 0, 255);*/

		if (remainingDepth <= 0)
			return backgroundColour;

		vector<Intersection*>* intersections = getIntersections(objects, ray, NULL, false, (remainingDepth < 2));
		Intersection* closestIntersection = getClosestIntersection(ray->origin, intersections);
		Vector3d closestOrigin;
		Vector3d closestDirection;
		SceneObject* closestObject;

		if (closestIntersection != NULL) {
			closestOrigin = *(closestIntersection->origin);
			closestDirection = *(closestIntersection->direction);
			closestObject = closestIntersection->object;
		}

		freeIntersections(intersections);
		intersections->clear();
		delete intersections;

		if (closestIntersection != NULL) {
			Vector3d fullLightColour = ambientLight;
			Vector3d surfaceColour = *(closestIntersection->object->colour);

			//for each light, add it to the full light on this point (if not blocked)
			for (unsigned int lightNum = 0; lightNum < lights->size(); lightNum++) {
				SceneObject* light = (*lights)[lightNum];
				Vector3d toLight = *(light->position) - closestOrigin;
				Vector3d toLightNormalized = toLight.normalized();
				double dot = toLightNormalized.dot(closestDirection);

				if (dot > 0) {
					intersections = getIntersections(objects, new Ray(&closestOrigin, &toLightNormalized), closestObject, true, false);
					bool inLight = false;
					if (intersections->size() == 0) {
						inLight = true;
					}
					else {
						Intersection* intersection = (*intersections)[0];
						Vector3d intersectionOrigin = Vector3d(*(intersection->origin));
						Vector3d intersectionDirection = Vector3d(*(intersection->direction));
						SceneObject* obj = intersection->object;

						if ((intersectionOrigin - closestOrigin).norm() > toLight.norm()) {
							inLight = true;
						}
					}

					if (inLight) {
						fullLightColour += *(light->colour) * dot;
					}

					freeIntersections(intersections);
					intersections->clear();
					delete intersections;
				}
			}

			double reflectivity = closestObject->reflectivity;
			if (reflectivity > 0) {
				Vector3d rayDirection = *(ray->direction);
				Vector3d normal = closestDirection;
				Vector3d reflectedDirection = rayDirection - ((2 * (normal.dot(rayDirection))) * normal);
				Ray* reflectedRay = new Ray(&closestOrigin, &reflectedDirection);

				Vector3d reflectionColour = traceRay(reflectedRay, objects, lights, remainingDepth - 1);
				delete reflectedRay;

				surfaceColour *= 1 - reflectivity;
				surfaceColour += reflectionColour * reflectivity;
			}

			Vector3d endColour = surfaceColour;
			endColour[0] *= fullLightColour[0] / 255;
			endColour[1] *= fullLightColour[1] / 255;
			endColour[2] *= fullLightColour[2] / 255;

			return endColour;
		}
		else {
			return backgroundColour;
		}
	}