PyCDC Object
A Device Context. Encapsulates an MFC CDC
class.
Methods
- AbortDoc
- Aborts a print job
- Arc
- Draws an arc.
- BeginPath
- Opens a path bracket in the device context
- BitBlt
- Copies a bitmap
- Chord
- Draws a chord.
- CreateCompatibleDC
- Creates a memory DC compatible with this DC.
- CreatePrinterDC
- Creates a device context for a specific printer
- DeleteDC
- Deletes all resources associated with a device context.
- DPtoLP
- Convert from device points to logical points.
- Draw3dRect
- Draws a three-dimensional rectangle.
- DrawFocusRect
- Draws a rectangle in the style used to indicate the rectangle has focus
- DrawFrameControl
- Draws a frame control of the specified type and style.
- DrawIcon
- Draws an icon on the DC.
- DrawText
- Formats text in the given rectangle
- Ellipse
- Draws an Ellipse.
- EndDoc
- Finishes spooling the document and starts printing it
- EndPage
- Finishes a page on a printer DC
- EndPath
- Closes a path bracket and selects the path defined by the
bracket into the specified device context
- ExtTextOut
- Writes text to the DC.
- FillPath
- Closes any open figures in the current path and fills the
path's interior by using the current brush and polygon-filling mode.
- FillRect
- Fills a given rectangle with the specified brush
- FillSolidRect
- Fills the given rectangle with the specified solid color.
- FrameRect
- Draws a border around the rectangle specified by rect
- GetBrushOrg
- Retrieves the origin (in device units) of the brush
currently selected for the device context.
- GetClipBox
- Retrives the current clipping region.
- GetCurrentPosition
- Retrieves the current position (in logical coordinates).
- GetDeviceCaps
- Retrieves current device capabilities.
- GetHandleAttrib
- Retrieves the handle of the attribute device context.
- GetHandleOutput
- Retrieves the handle of the output device context.
- GetMapMode
- Gets the mapping mode for the device context.
- GetNearestColor
- Returns the closest color a device can map.
- GetPixel
- Returns the value of a pixel at a location
- GetSafeHdc
- Returns the underlying windows handle for the DC object.
- GetTextExtent
- Calculates the size of the string.
- GetTextExtentPoint
- Alias for GetTextExtent - Calculates the size of the string.
- GetTextFace
- Retrieves the name of the current font.
- GetTextMetrics
- Retrieves the metrics for the current font.
- GetViewportExt
- Gets the viewport extent of the device context
- GetViewportOrg
- Gets the viewport origin of the device context
- GetWindowExt
- Gets the window extent of the device context
- GetWindowOrg
- Retrieves the x- and y-coordinates of the origin
of the window associated with the device context.
- IntersectClipRect
- Creates a new clipping region by forming the intersection of the current region
and the rectangle specified
- IsPrinting
- Returns 1 if the DC is currently printing, else 0
- LineTo
- Draws a line to a specified point.
- LPtoDP
- Convert from logical points to device points
- MoveTo
- Moves the current position to a specifed point.
- OffsetWindowOrg
- Modifies the coordinates of the window origin relative to the coordinates of the
current window origin.
- OffsetViewportOrg
- Modifies the coordinates of the viewport origin relative to the coordinates of
the current viewport origin
- PatBlt
- Creates a bit pattern on the device.
- Pie
- Draws a pie shape with specific starting and ending points in a rectangle
- PolyBezier
- Draws one or more Bezier splines.
- Polygon
- Draws an Polygon.
- Polyline
- Draws a Polyline.
- RealizePalette
- Maps palette entries in the current logical palette to the system palette.
- Rectangle
- Draws a rectangle using the current pen. The interior of
the rectangle is filled using the current brush.
- RectVisible
- Determines if a rectangle is currently visisble in the viewport.
- RestoreDC
- Restores a saved DC.
- SaveDC
- Saves a DC.
- ScaleWindowExt
- Modifies the window extents relative to the current values.
- ScaleViewportExt
- Modifies the viewport extents relative to the current values.
- SelectClipRgn
- Selects the given region as the current clipping region for the device context
- SelectObject
- Selects an object into the DC.
- SelectObject
- Selects the logical palette.
- SetBkColor
- Sets the background color.
- SetBkMode
- Sets the background mode.
- SetBrushOrg
- Specifies the origin that GDI will assign to the
next brush that the application selects into the device context.
- SetGraphicsMode
- Sets the graphics mode for the specified device context
- SetMapMode
- Sets the device mapping mode.
- SetPixel
- Set a pixel to a color
- SetPolyFillMode
- Sets the polygon-filling mode.
- SetROP2
- Sets the current drawing mode.
- SetTextAlign
- Sets the text alignment.
- SetTextColor
- Sets the text foreground color.
- SetWindowExt
- Sets the extents of the window.
- SetWindowOrg
- Sets the window origin of the device context
- SetViewportExt
- Sets the extents of the window's viewport.
- SetViewportOrg
- Sets the viewport origin of the device context
- SetWorldTransform
- sets a two-dimensional linear transformation between world space and page space
for the specified device context.
- StartDoc
- Starts spooling a document to a printer DC
- StartPage
- Starts a new page on a printer DC
- StretchBlt
- Copies a bitmap from the source device context to this device context.
- StrokeAndFillPath
- Closes any open figures in a path, strokes the outline of the path by using the
current pen, and fills its interior by using the current brush. The device context must contain a closed
path.
- StrokePath
- Renders the specified path by using the current pen.
- TextOut
- Writes text to the DC.