mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
DialogsDemo: Add scope around Graphics instance to ensure drawing is flushed to image before use
This commit is contained in:
parent
9cf7889422
commit
14ddfe2c22
1 changed files with 8 additions and 5 deletions
|
|
@ -515,11 +515,14 @@ private:
|
|||
auto myImage = getImageFromAssets ("juce_icon.png");
|
||||
|
||||
Image myImage2 (Image::RGB, 500, 500, true);
|
||||
Graphics g (myImage2);
|
||||
g.setColour (Colours::green);
|
||||
ColourGradient gradient (Colours::yellow, 170, 170, Colours::cyan, 170, 20, true);
|
||||
g.setGradientFill (gradient);
|
||||
g.fillEllipse (20, 20, 300, 300);
|
||||
|
||||
{
|
||||
Graphics g (myImage2);
|
||||
g.setColour (Colours::green);
|
||||
ColourGradient gradient (Colours::yellow, 170, 170, Colours::cyan, 170, 20, true);
|
||||
g.setGradientFill (gradient);
|
||||
g.fillEllipse (20, 20, 300, 300);
|
||||
}
|
||||
|
||||
Array<Image> images { myImage, myImage2 };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue