Re: How to use Wx::GetPixel function

James Lynes <[email protected]>
Newsgroups gmane.comp.lang.perl.wxperl
Message-ID <CABPysehEh4ra4ZyfcqhyPkdhqA4CscjUgLyv3iHvo9ge5f_X7g@mail.gmail.com>
Hi:

From the wxWidgets docs, the wxColour object has methods:

   GetAsString(wxC2S_NAME | wxC2S_CSS_SYNTAX) - returns a text
representation
   GetRGB()
- returns 32bit value
   GetRGBA()                                                              -
returns 32bit value

The above constants weren't easy to find for me. I think I used 2 for what
I needed.

One of these should help.

James


On Fri, Dec 12, 2014 at 3:43 PM, ademmler <[email protected]> wrote:
>
> Hi to all,
>
> I whish to builda "PixelCOlor" function based on WxPerl.
> I have used a sample from Matti Barbon and tweaked it.
> So far I have a working hack. When I click into the window I get the
> positon and a Wx::Colur Object.
>
> *Output:*
> Position: 152 375
> Color: Wx::Colour=SCALAR(0xa09ca0)
>
> *Questions:*
> - What is needed to get the RBB or RGBA vaulues for this pixel.
> - Is there a way to click outside the "window" - anywhere on the screen -
> and get the pixel color?
>
> Help and hints are welcome.
> Greetings Alexander
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.