Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 17th, 2006, 12:25 AM
Jive Dadson
Guest
 
Posts: n/a
Default wxPython help please

I hope someone can help me with a couple of wxPython questions, or point
me to the right newsgroup for the questions.

I am trying to modify the floatcanvas demo program. I want to load an
image from a file (jpg or whatever), then do a kind of color-picker
action on it.

I haven't tried yet to figure out how to load the file. Just for
starters, when I click on the canvas, I want to get the rgb pixel value
for the point under the cursor. I can't for the life of me figure out
how to do it. I suppose it begins with event.GetPosition(), but after
that I am at a loss.

The larger question is how to use wxPython. It's got such fabulous
stuff, but every time I try to do anything with it, I eventually give up
because I can't find adequate documentation. I know very little about
graphics programming.

Please respond here. Because of spammers, the email address is fake.

Thanks,
"Jive"
  #2  
Old December 17th, 2006, 01:05 AM
Sandra-24
Guest
 
Posts: n/a
Default Re: wxPython help please

Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.

-Sandra

  #3  
Old December 17th, 2006, 01:15 AM
Jive Dadson
Guest
 
Posts: n/a
Default Re: wxPython help please

Sandra-24 wrote:
Quote:
Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.
>
-Sandra
>
Thanks. I'll give it a look see.

You understand that what I want to do is get the pixel that's under the
cursor when I click, right? I don't really need to draw things, only
load an image from a file. But since this program already did so much
of what I wanted, I decided to try it. It is frustrating that after a
couple of hours I still can't figure out how to read a danged pixel.

  #4  
Old December 17th, 2006, 01:45 AM
Jive Dadson
Guest
 
Posts: n/a
Default Re: wxPython help please

Sandra-24 wrote:
Quote:
Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.
>
-Sandra
>

I bought the ebook. Searching for "pixel", all I came up with was a
method called GetPixel in a "device context." I know there must be a
device context buried in there somewhere, so now I need to winkle it out.
  #5  
Old December 17th, 2006, 03:25 AM
Sandra-24
Guest
 
Posts: n/a
Default Re: wxPython help please

On Dec 16, 8:43 pm, Jive Dadson <notonthe...@noisp.comwrote:
Quote:
>I bought the ebook. Searching for "pixel", all I came up with was a
method called GetPixel in a "device context." I know there must be a
device context buried in there somewhere, so now I need to winkle it out.
You are right that you need to capture the mouse down event for the
canvas and get the cursor position from there. To get the rgb value for
that pixel may require the dc, I don't remember enough about them to
say for sure. You might have better luck on the mailing list, it's a
high volume list and you'll likely get a good response there.

-Sandra

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles