
February 26th, 2003, 05:03 PM
|
 |
Rut row Raggy!
|
|
Join Date: Jul 2001
Location: Tornado Alley
|
|
Can I "draw" text or images?
In Win32, mIRC, and probably other lanugages, you can draw text or images on a certain part of the screen. For example, in Win32, you might create a function like this:
void SayHello(HWND hWindow) {
HDC hDC;
RECT rect;
GetClientRect(hWindow, &rect);
hDC = GetDC(hWindow);
DrawText(hDC, TEXT("Hello!"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
ReleaseDC(hWindow, hDC);
}
...which writes "Hello" on the screen, and centers it.
I was told that Python allows you to do this, but I have been unable to find any documentation of it. The reason I ask is because I want to be able to place text in a window at a certain point and have it (for example) print from right to left. Same thing with images...I want to be able to place them at a certain point on the screen. BTW, I'm using wxPython for as my IDE.
Thanks in advance to anyone who can help!
__________________
Matt
Last edited by marron79 : February 26th, 2003 at 05:08 PM.
|