13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>The</strong> Graphics Device Interfacehttp://www.zetcode.com/wxpython/gdi/In the following lines we will introduce several elementaryobjects. Colours, Brushes, Pens, Joins, Caps, Gradients.ColoursA colour is an object representing a combination of Red,Green, and Blue (RGB) intensity values. Valid RGB values arein the range 0 to 255. <strong>The</strong>re are three ways for settingcolours. We can create a wx.Colour object, use a predefinedcolour name or use hex value string. wx.Colour(0,0,255),'BLUE', '#0000FF'. <strong>The</strong>se three notations produce the samecolour.I prefer the hexadecimal notation. A perfect tool for workingwith colours can be found on the colorjack.com website. Or wecan use such a tool as Gimp.We have also a list of predefined colour names that we canuse in our programs.6 de 44 27/04/2008 1:08

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!