From 112664c125a0f4828dbc40f35c3ba79aafba42d0 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 1 Aug 2007 11:51:42 +0000 Subject: [PATCH] --- extras/example projects/common/Main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extras/example projects/common/Main.cpp b/extras/example projects/common/Main.cpp index 34bd5e43f0..f580443c92 100644 --- a/extras/example projects/common/Main.cpp +++ b/extras/example projects/common/Main.cpp @@ -26,10 +26,16 @@ public: void paint (Graphics& g) { + // clear the background with solid white g.fillAll (Colours::white); + // set our drawing colour to black.. g.setColour (Colours::black); + + // choose a suitably sized font g.setFont (20.0f, Font::bold); + + // and draw the text, centred in this component g.drawText (T("Hello World!"), 0, 0, getWidth(), getHeight(), Justification::centred, false); @@ -53,6 +59,8 @@ public: setContentComponent (new HelloWorldContentComponent()); setVisible (true); + + // centre the window on the desktop with this size centreWithSize (400, 200); }