13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>The</strong> Graphics Device Interfacehttp://www.zetcode.com/wxpython/gdi/2D Vector Graphics<strong>The</strong>re are two different computer graphics. Vector and rastergraphics. Raster graphics represents images as a collection ofpixels. Vector graphics is the use of geometrical primitivessuch as points, lines, curves or polygons to represent images.<strong>The</strong>se primitives are created using mathematical equations.Both types of computer graphics have advantages anddisadvantages. <strong>The</strong> advantages of vector graphics over rasterare:smaller sizeability to zoom indefinitelymoving, scaling, filling or rotating does not degrade thequality of an imageTypes of primitivespointslinespolylinespolygonscirclesellipsesSplinesDevice context attributesAttribute Object Default value Get MethodBrush wx.Brush wx.WHITE_BRUSH wx.Brush GetBrush()Pen wx.Pen wx.BLACK_PEN wx.Pen GetPen()Mapping Mode - wx.MM_TEXT int GetMapMode()BackgroundMode - wx.TRANSPARENTText backgroundcolourText foregroundcolourwx.Colourwx.Colourwx.WHITEwx.BLACKintGetBackgroundMode()wx.ColourGetTextBackground()wx.ColourGetTextForeground()B A S I C E L E M E N T S5 de 44 27/04/2008 1:08

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

Saved successfully!

Ooh no, something went wrong!