Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,179 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,369 people online right now. Registration is fast and FREE... Join Now!




C++ graphics sugestions

 
Reply to this topicStart new topic

C++ graphics sugestions, draw an image on desktop (with out window box) for linux

calvinthedestroyer
4 Jul, 2008 - 11:37 AM
Post #1

D.I.C Head
**

Joined: 13 Oct, 2007
Posts: 99



Thanked: 1 times
Expert In: QBasic, Legos

My Contributions
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. smile.gif
________________________________________________
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: 4 Jul, 2008 - 12:06 PM
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: C++ Graphics Sugestions
4 Jul, 2008 - 11:56 AM
Post #2

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,461



Thanked: 10 times
Dream Kudos: 325
My Contributions
Lot's of transparent windows, likely.

You could probably make it as a widget for one of the popular widget programs out there.
User is offlineProfile CardPM
+Quote Post

calvinthedestroyer
RE: C++ Graphics Sugestions
4 Jul, 2008 - 12:57 PM
Post #3

D.I.C Head
**

Joined: 13 Oct, 2007
Posts: 99



Thanked: 1 times
Expert In: QBasic, Legos

My Contributions
QUOTE(Tom9729 @ 4 Jul, 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.


CODE
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.

User is offlineProfile CardPM
+Quote Post

Tom9729
RE: C++ Graphics Sugestions
4 Jul, 2008 - 04:09 PM
Post #4

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,461



Thanked: 10 times
Dream Kudos: 325
My Contributions
Sorry, that's not the definition of widget that I was going for. smile.gif

http://www.wikihow.com/Install-Widgets-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: 4 Jul, 2008 - 04:09 PM
User is offlineProfile CardPM
+Quote Post

Ambercroft
RE: C++ Graphics Sugestions
5 Jul, 2008 - 07:24 PM
Post #5

D.I.C Head
Group Icon

Joined: 5 Jan, 2007
Posts: 107



Thanked: 3 times
Dream Kudos: 25
My Contributions
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.

cool.gif
User is offlineProfile CardPM
+Quote Post

calvinthedestroyer
RE: C++ Graphics Sugestions
8 Jul, 2008 - 06:32 AM
Post #6

D.I.C Head
**

Joined: 13 Oct, 2007
Posts: 99



Thanked: 1 times
Expert In: QBasic, Legos

My Contributions
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.


User is offlineProfile CardPM
+Quote Post

calvinthedestroyer
RE: C++ Graphics Sugestions
8 Jul, 2008 - 07:25 AM
Post #7

D.I.C Head
**

Joined: 13 Oct, 2007
Posts: 99



Thanked: 1 times
Expert In: QBasic, Legos

My Contributions
QUOTE(Tom9729 @ 4 Jul, 2008 - 05:09 PM) *

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.

User is offlineProfile CardPM
+Quote Post

Tom9729
RE: C++ Graphics Sugestions
9 Jul, 2008 - 05:49 PM
Post #8

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,461



Thanked: 10 times
Dream Kudos: 325
My Contributions
QUOTE(calvinthedestroyer @ 8 Jul, 2008 - 10: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.

I've never seen the term "widget" associated with malware. smile.gif

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.

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 11:03AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month