Crystal Space
Welcome, Guest. Please login or register.
August 21, 2014, 11:11:20 am

Login with username, password and session length
Search:     Advanced search
9012 Posts in 2050 Topics by 8331 Members
Latest Member: Donasand
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Python and Pixmaps
« previous next »
Pages: [1] Print
Author Topic: Python and Pixmaps  (Read 2373 times)
andygodwin
Newbie
*
Posts: 10


View Profile Email
« on: April 26, 2006, 01:59:05 pm »

I've been trying to use pixmaps from within a pure Python CS application for a while now, and I can't get it to work. The manual for the 'normal' API says to call csSimplePixmap(texture) to get a pixmap object, but that doesn't exist in the Python API (all there is is csPixmap). Any ideas? Is csSimplePixmap hidden somewhere? Is it just not in the Python API?

Furthermore, is there any sort of Python documentation for CrystalSpace (even a random tutorial, program or api reference would help)? I've searched, but I can't seem to find much. Is it just the case that all the sensible people go and use C++ instead?
Logged
Ruel Haldi
Newbie
*
Posts: 18


View Profile Email
« Reply #1 on: April 27, 2006, 05:13:19 am »

There's the python examples that come with the download. Although perhaps you already knew about those.

I agree, the information available to Python users is often insufficient. I'm trying to remedy this by writing a few tutorials, but I'm still a beginner myself. As far as the csSimplePixmap() function, I can't help you. I've run into similar issues where the normal C functions just don't exist in Python.
Logged
andygodwin
Newbie
*
Posts: 10


View Profile Email
« Reply #2 on: April 27, 2006, 04:48:18 pm »

Yes, I've scoured the tutorials for as much information as they're worth. Thinking back to my previous experiments with cspace I seem to remeber other functions not being available, although I never thought very much about it until now.

I suppose a workaround could be possible, by using actual object to model the interface or whatever, but it seems an awful hack.

Perhaps all that needs doing is getting the SWIG interface file that builds the Python bindings updated... I may go and see how complicated that is.
Logged
andygodwin
Newbie
*
Posts: 10


View Profile Email
« Reply #3 on: May 05, 2006, 10:29:38 pm »

Just to update, I had a look in the swig/ivaria files and it seems that csSimplePixmap got renamed to csPixmap for python, so pixmaps are actually in the Python bindings after all (and I have tried using this fact and it works great).

I'm suspecting that there are possibly more renames like this that could be the reason for the 'missing' functions. I'll be looking, and possibly writing them up if I find any.
Logged
Ruel Haldi
Newbie
*
Posts: 18


View Profile Email
« Reply #4 on: May 06, 2006, 03:59:48 am »

That's great! You see to understand this a lot better than I do. I've run into a few similar issues with Python that I've managed to get around, but where are we supposed to write down this sort of thing?
Logged
andygodwin
Newbie
*
Posts: 10


View Profile Email
« Reply #5 on: May 07, 2006, 11:14:52 am »

That's a good question. The Wiki on this community site seems to be hidden away, locked down and not particularly active anyway. I have some webspace lying around, I may write some stuff up on there. I think it would be best to gather a good list first, though.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.157 seconds with 16 queries.