[Lazarus] Examples of CairoCanvas usage
Petr Kristan
petr.kristan at epos.cz
Tue Feb 10 16:06:44 CET 2015
On Tue, Feb 10, 2015 at 03:53:16PM +0200, Juha Manninen wrote:
> On Tue, Feb 10, 2015 at 11:40 AM, Petr Kristan <petr.kristan at epos.cz> wrote:
> > c.Font.Name := 'Arial';
> > c.Font.Height := 12;
>
> Wow, my test code only needed the font definition, then it works.
> My bad, I should have tested that. Normal GUI canvas has some font by default.
> I added a simple program to components/cairocanvas/example which draws
> an ellipse and text.
> You can improve it if you want and send a patch.
>
> Your example adds a dependency for GTK2. It is logically wrong if you
> only want to demonstrate CairoCanvas.
> My understanding is that GTK2 depends on CairoCanvas, not the other way around.
> What is the purpose of the WidgetSet variable? You create it but don't
> use it for anything. My prog works without it now that it has a font
> defined. The only dependency in the uses section of my program is
> CairoCanvas.
It is about two years when I used this last time. And it was neded.
It is good to hear, that I can remove this dependency.
Petr
--
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401 Czech Republic (Eastern Europe)
fax: +420 461101481
More information about the Lazarus
mailing list