Results 1 to 10 of 10

Thread: How can i draw on desktop?

  1. #1
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question How can i draw on desktop?

    Hi guys:
    I wanna know how can i draw a picture on the desktop of Linux.
    thx!

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How can i draw on desktop?

    Define "on the desktop" please.

    As in a wallpaper?

    Anyway, if you want to do anything platform specific, you will need to look at the platform api's. In this case at least the KDE and GNOME api's

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i draw on desktop?

    OS's are normally quite protective of there desktops. The easiest way to do what you want therefore is to create a frameless window and draw on that. There are platform specific APIs (as stated already) that allow you to grab a copy of the desktop, should you wish to make your window more transparent.

  4. #4
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How can i draw on desktop?

    Quote Originally Posted by squidge View Post
    OS's are normally quite protective of there desktops. The easiest way to do what you want therefore is to create a frameless window and draw on that. There are platform specific APIs (as stated already) that allow you to grab a copy of the desktop, should you wish to make your window more transparent.
    thx for the advice, what i have been doing is to develop a screen recorder which is a project my teacher gave me, and i already did the part of recording. Now the problem is i wanna to draw a rect on the desktop or on the bottom layer of the desktop as the valid area. So i wander if it is possible.
    Last edited by Keigo; 11th October 2010 at 05:32.

  5. #5
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How can i draw on desktop?

    Quote Originally Posted by tbscope View Post
    Define "on the desktop" please.

    As in a wallpaper?

    Anyway, if you want to do anything platform specific, you will need to look at the platform api's. In this case at least the KDE and GNOME api's
    Now i am working on a screen recorder, so i want to draw a rect in a wallpaper or underneath the wallpaper as a valid recording area. Of cause, it should not interfere the Linux's event response (mouse event etc.).

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How can i draw on desktop?

    Now the problem is i wanna to draw a rect on the desktop or on the bottom layer of the desktop as the valid area. So i wander if it is possible.
    If you draw a transparent widget with only solid opaque borders, it will appear like a rect on the desktop !! isnt it

  7. #7
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How can i draw on desktop?

    Quote Originally Posted by Keigo View Post
    Now i am working on a screen recorder, so i want to draw a rect in a wallpaper or underneath the wallpaper as a valid recording area. Of cause, it should not interfere the Linux's event response (mouse event etc.).
    You want it to be on top of everything else.

    With "not interfere", do you mean not send or receive messages generated by or destined for your rectangle? That would be extremely difficult.

  8. #8
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How can i draw on desktop?

    With "not interfere", do you mean not send or receive messages generated by or destined for your rectangle? That would be extremely difficult
    well, i would say no. what you just said ,there is no doubt, is also a mission impossible for me. But
    what i really mean “not interfere” is not interfere users' operation. For instance, users can click or double click the icons on the desktop, drag window. Have you ever heard or used a screen recorder named "Camtasia Studio". If you do, you would know exactly what i am talking about.
    Anyway, thanks again.

  9. #9
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i draw on desktop?

    Right, so what you really want to do is record on-screen activity?

  10. #10
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Post Re: How can i draw on desktop?

    Quote Originally Posted by squidge View Post
    Right, so what you really want to do is record on-screen activity?
    yes, all i wanted is to record on-screen activity in a selected area.

Similar Threads

  1. can you draw over a pushbutton?
    By illuzioner in forum Qt Programming
    Replies: 4
    Last Post: 30th August 2017, 08:14
  2. How to draw a arc
    By ProTonS in forum Qt Programming
    Replies: 3
    Last Post: 9th September 2009, 15:41
  3. Draw on a Progress Bar
    By fruzzo in forum Qt Programming
    Replies: 1
    Last Post: 8th December 2007, 15:31
  4. draw a polyline
    By bonics in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2007, 10:51
  5. Best way to draw x,y graphs
    By steg90 in forum Newbie
    Replies: 1
    Last Post: 14th May 2007, 11:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.