Index > Lgi > GSurface | |
---|---|
Author/Date | GSurface |
Levon 24/02/2006 6:44pm | Is there any function in GSurface(GDeviceContext) class to draw text? |
fret 24/02/2006 8:39pm | Use a GFont to draw text.
i.e. GSurface *pSurface; SysFont->Draw(pSurface, x, y, "String"); SysFont resolves to a system wide GFont object that has been initialized to have the same face/point size as the rest of the apps. Otherwise you can create your own: GFont f; f.Create("Verdana", 10"); etc. |
Levon 01/03/2006 11:10am | I didn't found Draw function in GFont, but I've found Text function that does the same, now it's OK. Thanks a lot. Another question: how can I set text color or background color. |
fret 01/03/2006 8:44pm | Use GFont::Colour. It is effected by the setting passed to GFont::Transparent as well. If you do Font->Transparent(true) the background is transparent otherwise it's solid. |
Reply | |