Exemplo n.º 1
0
void HrtfBiAuralAudioProcessorEditor::paintOverChildren(Graphics& g)
{
	if (!processor_.isHRIRLoaded())
	{
		FillType fill;
		fill.setColour(Colours::black);
		fill.setOpacity(0.7f);
		g.setFillType(fill);
		g.fillRect(getBounds());
		g.setColour(Colours::whitesmoke);
		g.setFont(40);
		g.drawFittedText("HRIR not loaded\nPlugin disabled", getBounds(), Justification::centred, 2);
	}
}
Exemplo n.º 2
0
    void drawDemo (Graphics& g) override
    {
        Image image = isArgb ? argbImage : rgbImage;

        AffineTransform transform (AffineTransform::translation ((float) (image.getWidth() / -2),
                                                                 (float) (image.getHeight() / -2))
                                   .followedBy (getTransform()));

        if (isTiled)
        {
            FillType fill (image, transform);
            fill.setOpacity (getAlpha());
            g.setFillType (fill);
            g.fillAll();
        }
        else
        {
            g.setOpacity (getAlpha());
            g.drawImageTransformed (image, transform, false);
        }
    }