C++ graphics sugestions

draw an image on desktop (with out window box) for linux

Page 1 of 1

7 Replies - 1203 Views - Last Post: 09 July 2008 - 06:49 PM Rate Topic: -----

#1 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 167
  • View blog
  • Posts: 1,913
  • Joined: 13-October 07

C++ graphics sugestions

Post icon  Posted 04 July 2008 - 12:37 PM

hello
My question is "Whats a good book on how to make graphics for Xwindows?"
________________________________________________
Here is a description to help you with my question:
I know (from my DOS days) how to draw an image on the screen.
Now I want to learn how to draw an image onto the desk top, with out a boarder around it. I want it to look like its sitting there along with the other icons.
This will be for a "card playing game" I don't want the game to run in its own window, I want it to be played on the desktop, just like how you would play on the table. :)
________________________________________________
What I need:
* a good book on how to handle graphics in Xwindows (Flux box)
* or a nice tutorial.
________________________________________________
More questions:
* can I use GCC in linux, to write graphic programs for xwindows? (it has all the library's that I would need, right?)
* if I write this for Linux Slackware 10.2 will it be compatible with all vers of Linux?
________________________________________________
in closing:
I have written some of this program in good ol QBasic just to test its logic but I need to learn graphics to make it really come together.
This is really starting at the bottom, and I don't really know were to start.

Thanks ahead of time.
calvinthedestroyer

________________________________________________

This post has been edited by calvinthedestroyer: 04 July 2008 - 01:06 PM


Is This A Good Question/Topic? 0
  • +

Replies To: C++ graphics sugestions

#2 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: C++ graphics sugestions

Posted 04 July 2008 - 12:56 PM

Lot's of transparent windows, likely.

You could probably make it as a widget for one of the popular widget programs out there.
Was This Post Helpful? 0
  • +
  • -

#3 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 167
  • View blog
  • Posts: 1,913
  • Joined: 13-October 07

Re: C++ graphics sugestions

Posted 04 July 2008 - 01:57 PM

View PostTom9729, on 4 Jul, 2008 - 12:56 PM, said:

Lot's of transparent windows, likely.

You could probably make it as a widget for one of the popular widget programs out there.


widget:
A widget is portable chunk of code that allows you to share content across the internet.
or in my case, multiple operating systems.


ah, ok. I would of just called it a function or made it into a DLL.
Was This Post Helpful? 0
  • +
  • -

#4 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: C++ graphics sugestions

Posted 04 July 2008 - 05:09 PM

Sorry, that's not the definition of widget that I was going for. :)

http://www.wikihow.c...gets-on-Your-PC
http://widgets.opera.com/
http://desktop.google.com/plugins/

-------------------------------

You've changed your post considerably since my reply. Didn't know you were talking about xwindows.

Nearly everything in Linux is written in C, what you'll need is a graphics toolkit. One that comes with X11 and is pretty much guaranteed to be on any Linux machine is the XToolkit. There's also FLTK, GTK, QT, and many others.

Your best bet would be to draw a window with no borders (you'll have to pass that off as a hint to the window manager, I believe Fluxbox supports doing that), and then use pseudo-transparency to make it appear as though the cards are right on the desktop. A typical way of doing this is to take the section of the wallpaper the window is covering and paint the background of the window with it.

This post has been edited by Tom9729: 04 July 2008 - 05:09 PM

Was This Post Helpful? 0
  • +
  • -

#5 Ambercroft  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 129
  • Joined: 05-January 07

Re: C++ graphics sugestions

Posted 05 July 2008 - 08:24 PM

I have various books on the X windows system. There is a set from O'Reilly that is more of a reference set. I have 4 of 7+ but you better have some idea how to deal with X windows first. X Powertools is a new book out from O'Reilly which is supposed to be good, I'm going to order it soon. 'X Window Programming from scratch' from Que is reasonable even if goes off in directions I'm not particularly interested in.

B)
Was This Post Helpful? 0
  • +
  • -

#6 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 167
  • View blog
  • Posts: 1,913
  • Joined: 13-October 07

Re: C++ graphics sugestions

Posted 08 July 2008 - 07:32 AM

I don't want to call my game a "widget" widgets were always the things that contained viruses and malware and or spyware. To me, widgets or programs of that type seem to do more damage than good.

This is going to be a game and I want it to be a complete program.
Was This Post Helpful? 0
  • +
  • -

#7 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 167
  • View blog
  • Posts: 1,913
  • Joined: 13-October 07

Re: C++ graphics sugestions

Posted 08 July 2008 - 08:25 AM

View PostTom9729, on 4 Jul, 2008 - 05:09 PM, said:

You've changed your post considerably since my reply. Didn't know you were talking about xwindows.


Oh yeah, sorry about that. for some reason hitting TAB caused the post to post.
Was This Post Helpful? 0
  • +
  • -

#8 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: C++ graphics sugestions

Posted 09 July 2008 - 06:49 PM

View Postcalvinthedestroyer, on 8 Jul, 2008 - 10:32 AM, said:

I don't want to call my game a "widget" widgets were always the things that contained viruses and malware and or spyware. To me, widgets or programs of that type seem to do more damage than good.

This is going to be a game and I want it to be a complete program.

I've never seen the term "widget" associated with malware. :)

There are several programs that display widgets (and call widgets "widgets") from big companies like Apple, Google, Opera, etc. I think if anything you'd be jumping on the bandwagon.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1