473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

wxWindows off-screen?

Is it possible to draw a widget or a window in an off-screen buffer?
What I'm trying to do is capture rendered HTML to a bitmap (in other
words, something like html2bitmap) by using wxWindows' HTML widget. If
anyone has a different way of doing it, I'd be glad to hear it...
Jan 5 '07 #1
1 1852
Ivan Voras wrote:
Is it possible to draw a widget or a window in an off-screen buffer?
(Assuming that you are on linux.)

wxWigets (wxWindows is the old name) or better, since if you are on a
python ng, wxPython :), can't be used if you are on a not-X machine:

michele:~$ env | grep DIS
DISPLAY=:0.0
michele:~$ export DISPLAY=
michele:~$ env | grep DIS
DISPLAY=
michele:~$ python
Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
[GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import wx a = wx.PySimpleApp()
Unable to access the X Display, is $DISPLAY set properly?
michele:~$ echo $?
1
michele:~$
What I'm trying to do is capture rendered HTML to a bitmap (in other
words, something like html2bitmap) by using wxWindows' HTML widget.
If anyone has a different way of doing it, I'd be glad to hear it...
For me you have some solutions:
- open an X server (only X, you don't need gdm, kdm other), set the
right DISPLAY env variable and use wx. Ok, you need (a lot of) memory,
that in my tests are about 16 M for Xorg and 24 for python with wx,
a wxFrame, wxPanel and some controls.
Can be a good/the right solution for me.
- If I remember correctly, there are a project that "emulate" an X
server (so the same that the X solution, but with less memory), but I
don't know its name... Try to search on internet.
- Always with an X server, use a browser and with its api (pyxpcom for
mozilla based, or dcop and pykde for konqueror and so on...), using
the "print on a file" feature, so print a ps and convert it on an
image.

Good try :), and not forgot to tell us your results!

Hope this help,
Michele
Jan 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shagshag | last post by:
hello, does anyone know of a full python + wxWindows email client ? google didn't help me... thanks,
0
by: Frank Bechmann | last post by:
I started to write a SciTe director in python. I had a very basic communication running in Pythonwin but I disliked the strong mixture between Pythonwin's basic functionality and the Pythonwin...
20
by: Ben Finney | last post by:
Howdy all, Just when we thought things were looking up on the whole "Windows as a trademark" for something that Microsoft didn't originate in the first place. The wxWindows project have...
0
by: Kenneth Payne | last post by:
I'm just experimenting with wxPython coding with wxWindows on SuSE 9.0. However, my application looks awful. And it's not my code - the demo apps look awful too. The font is ugly (every font you...
3
by: Kenneth McDonald | last post by:
If this is not an appropriate newsgroup for this type of posting, please let me know and (if possible) suggest an alternative. I've done a fair bit of research on the net, but information is...
0
by: Laura Lucas | last post by:
Hi I would like to use cygwin with Dev-c++ but i dont know how, i would need step by step instructions starting from scratch, i tried very hard already. things i already done: install cygwin,...
4
by: Sathyaish | last post by:
My question will sound daft to the good old craftsmen, but they will excuse my nescience on the subject. I come new to the Pythonic world from the land of .NET languages, VB6 and some familiarity...
2
by: berkay | last post by:
hi all,am trying to learn gui programming i have such a code #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include "base.h" IMPLEMENT_APP(MainApp) // A macro that...
0
by: andrei.zavidei | last post by:
Hi guys, Well, here is my humble contribution to the community: http://sourceforge.net/projects/erocket I started that project to learn Python and wxWindows. By all means, I am no Python...
2
by: frikk | last post by:
This should be a very simple one, sorry! I installed wxWindows on my OS X box but I am unable to get my python install to recognize the module. Unfortunately I don't know a whole lot about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.