Home | Trees | Index | Help |
|
---|
Package wx :: Class PaintDC |
|
object
--+ |Object
--+ |DC
--+ | PaintDC
A wx.PaintDC must be constructed if an application wishes to paint on the client area of a window from within an EVT_PAINT event handler. This should normally be constructed as a temporary stack object; don't store a wx.PaintDC object. If you have an EVT_PAINT handler, you must create a wx.PaintDC object within it even if you don't actually use it.
Using wx.PaintDC within EVT_PAINT handlers is important because it automatically sets the clipping area to the damaged area of the window. Attempts to draw outside this area do not appear.
To draw on a window from outside EVT_PAINT handlers, construct a
wx.ClientDC
object.
Method Summary | |
---|---|
PaintDC |
Constructor. |
__repr__(self)
| |
Inherited from DC | |
| |
| |
Allows for optimization of drawing code on platforms that need it. | |
bool |
Copy from a source DC to this DC. |
bool |
Copy from a source DC to this DC. |
Adds the specified point to the bounding box which can be retrieved with MinX , MaxX and MinY , MaxY or GetBoundingBox functions. | |
Adds the specified point to the bounding box which can be retrieved with MinX , MaxX and MinY , MaxY or GetBoundingBox functions. | |
bool |
|
bool |
|
Clears the device context using the current background brush. | |
Performs all necessary computations for given platform and context type after each change of scale and origin parameters. | |
Displays a cross hair using the current pen. | |
Displays a cross hair using the current pen. | |
Destroys the current clipping region so that none of the DC is clipped. | |
int |
Convert device X coordinate to logical coordinate, using the current mapping mode. |
int |
Convert device X coordinate to relative logical coordinate, using the current mapping mode but ignoring the x axis orientation. |
int |
Converts device Y coordinate to logical coordinate, using the current mapping mode. |
int |
Convert device Y coordinate to relative logical coordinate, using the current mapping mode but ignoring the y axis orientation. |
Draws an arc of a circle, centred on the center point (xc, yc), from the first point to the second. | |
Draws an arc of a circle, centred on the center point (xc, yc), from the first point to the second. | |
Draw a bitmap on the device context at the specified point. | |
Draw a bitmap on the device context at the specified point. | |
Draws a check mark inside the given rectangle. | |
Draws a check mark inside the given rectangle. | |
Draws a circle with the given center point and radius. | |
Draws a circle with the given center point and radius. | |
Draws an ellipse contained in the specified rectangle. | |
Draw a list of ellipses as quickly as possible. | |
Draws an ellipse contained in the specified rectangle. | |
Draws an ellipse contained in the specified rectangle. | |
Draws an arc of an ellipse, with the given rectangle defining the bounds of the ellipse. | |
Draws an arc of an ellipse, with the given rectangle defining the bounds of the ellipse. | |
Draw an icon on the display (does nothing if the device context is PostScript). | |
Draw an icon on the display (does nothing if the device context is PostScript). | |
Rect |
Draw text and an image (which may be wx.NullBitmap to skip drawing it) within the specified rectangle, abiding by the alignment flags. |
Draw text within the specified rectangle, abiding by the alignment flags. | |
Draws a line from the first point to the second. | |
Draw a list of lines as quickly as possible. | |
Draws a line from the first point to the second. | |
Draws lines using a sequence of wx.Point objects, adding the
optional offset coordinate. | |
Draws a point using the current pen. | |
Draw a list of points as quickly as possible. | |
Draws a point using the current pen. | |
Draws a filled polygon using a sequence of wx.Point objects, adding
the optional offset coordinate. | |
Draw a list of polygons, each of which is a list of points. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draw a list of rectangles as quickly as possible. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draws the text rotated by angle degrees, if supported by the platform. | |
Draws the text rotated by angle degrees, if supported by the platform. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draws a rectangle with the given top left corner, and with the given size. | |
Draws a spline between all given control points, (a list of wx.Point
objects) using the current pen. | |
Draws a text string at the specified point, using the current text font, and the current text foreground and background colours. | |
Draw a list of strings using a list of coordinants for positioning each string. | |
Draws a text string at the specified point, using the current text font, and the current text foreground and background colours. | |
Ends a document (only relevant when outputting to a printer). | |
Ends the group of drawing primitives started with BeginDrawing , and
invokes whatever optimization is available for this DC type on the
current platform. | |
Ends a document page (only relevant when outputting to a printer). | |
bool |
Flood fills the device context starting from the given point, using the current brush colour, and using a style: |
bool |
Flood fills the device context starting from the given point, using the current brush colour, and using a style: |
Brush |
Gets the brush used for painting the background. |
int |
Returns the current background mode, either wx.SOLID or wx.TRANSPARENT. |
(x1,y1, x2,y2) |
Returns the min and max points used in drawing commands so far. |
Brush |
Gets the current brush |
int |
Gets the character height of the currently set font. |
int |
Gets the average character width of the currently set font. |
(x, y, width, height) |
Gets the rectangle surrounding the current clipping region. |
Rect |
Gets the rectangle surrounding the current clipping region. |
int |
Returns the colour depth of the DC. |
Point |
|
(x,y) |
|
Font |
Gets the current font |
(width, height, descent, externalLeading) |
Get the width, height, decent and leading of the text using the current or specified font. |
int |
Gets the current logical function (set by SetLogicalFunction ). |
Point |
|
(x,y) |
|
(xScale, yScale) |
|
int |
Gets the current mapping mode for the device context |
(width, height, descent, externalLeading) |
Get the width, height, decent and leading of the text using the current or specified font. |
<function GetOptimization at 0xb7b543e4> is deprecated | |
[widths] |
Returns a list of integers such that each value is the distance in pixels from the begining of text to the coresponding character of text. |
Pen |
Gets the current pen |
Colour |
Gets the colour at the specified location on the DC. |
Colour |
|
Size |
Resolution in Pixels per inch |
Size |
This gets the horizontal and vertical resolution in device units. |
Size |
Get the DC size in milimeters. |
(width, height) |
Get the DC size in milimeters. |
(width, height) |
This gets the horizontal and vertical resolution in device units. |
Colour |
Gets the current text background colour |
(width, height) |
Get the width and height of the text using the current font. |
Colour |
Gets the current text foreground colour |
(xScale, yScale) |
Gets the current user scale factor (set by SetUserScale ). |
int |
Converts logical X coordinate to device coordinate, using the current mapping mode. |
int |
Converts logical X coordinate to relative device coordinate, using the current mapping mode but ignoring the x axis orientation. |
int |
Converts logical Y coordinate to device coordinate, using the current mapping mode. |
int |
Converts logical Y coordinate to relative device coordinate, using the current mapping mode but ignoring the y axis orientation. |
int |
Gets the maximum horizontal extent used in drawing commands so far. |
int |
Gets the maximum vertical extent used in drawing commands so far. |
int |
Gets the minimum horizontal extent used in drawing commands so far. |
int |
Gets the minimum vertical extent used in drawing commands so far. |
bool |
Returns true if the DC is ok to use. |
Resets the bounding box: after a call to this function, the bounding box doesn't contain anything. | |
Sets the x and y axis orientation (i.e., the direction from lowest to highest values on the axis). | |
Sets the current background brush for the DC. | |
mode may be one of wx.SOLID and wx.TRANSPARENT. | |
Sets the current brush for the DC. | |
Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. | |
Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. | |
Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. | |
Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. | |
| |
| |
Sets the current font for the DC. | |
Sets the current logical function for the device context. | |
| |
| |
| |
The mapping mode of the device context defines the unit of measurement used to convert logical units to device units. | |
<function SetOptimization at 0xb7b543ac> is deprecated | |
If this is a window DC or memory DC, assigns the given palette to the window or bitmap associated with the DC. | |
Sets the current pen for the DC. | |
Sets the current text background colour for the DC. | |
Sets the current text foreground colour for the DC. | |
Sets the user scaling factor, useful for applications which require 'zooming'. | |
bool |
Starts a document (only relevant when outputting to a printer). |
Starts a document page (only relevant when outputting to a printer). | |
Inherited from Object | |
Deletes the C++ object this Python object is a proxy for. | |
String |
Returns the class name of the C++ class using wxRTTI. |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... |
Method Details |
---|
__init__(self,
win)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:54:59 2007 | http://epydoc.sf.net |