bool JUCESplashScreen::hitTest (int x, int y) { if (! hasStartedFading) return getLogoArea (getLocalBounds().toFloat()).contains ((float) x, (float) y); return false; }
void JUCESplashScreen::paint (Graphics& g) { auto r = getLocalBounds().toFloat(); Point<float> bottomRight (0.9f * r.getWidth(), 0.9f * r.getHeight()); ColourGradient cg (Colour (0x00000000), Line<float> (0.0f, r.getHeight(), r.getWidth(), 0.0f) .findNearestPointTo (bottomRight), Colour (0xff000000), bottomRight, false); cg.addColour (0.25f, Colour (0x10000000)); cg.addColour (0.50f, Colour (0x30000000)); cg.addColour (0.75f, Colour (0x70000000)); g.setFillType (cg); g.fillAll(); content->drawWithin (g, getLogoArea (r), RectanglePlacement::centred, 1.0f); if (splashDisplayTime == 0) splashDisplayTime = Time::getMillisecondCounter(); if (! isTimerRunning()) startTimer (millisecondsToDisplaySplash); }
bool JUCESplashScreen::hitTest (int x, int y) { return getLogoArea (getLocalBounds().toFloat()).contains ((float) x, (float) y); }