-
- /**
- For a Windows printer device context, this gets the horizontal and
- vertical resolution.
- */
- void GetSize(wxCoord* width, wxCoord* height);
-
- //@{
- /**
- Gets the current text background colour.
-
- @see SetTextBackground()
- */
- wxColour GetTextBackground() const;
- const wxColour& GetTextBackground() const;
- //@}
-
- /**
- Gets the dimensions of the string using the currently selected font.
-
- @param string
- The text string to measure.
- @param w
- This value will be set to the width after this call.
- @param h
- This value will be set to the height after this call.
- @param descent
- The dimension from the baseline of the font to the bottom of the
- descender.
- @param externalLeading
- Any extra vertical space added to the font by the font designer
- (usually is zero).
- @param font
- Specifies an alternative to the currently selected font: but note
- that this does not yet work under Windows, so you need to set a
- font for the device context first.
-
- @see wxFont, SetFont()
- */
- void GetTextExtent(const wxString& string, wxCoord* w, wxCoord* h,
- wxCoord* descent = NULL,
- wxCoord* externalLeading = NULL,
- const wxFont* font = NULL) const;
-
- //@{
- /**
- Gets the current text foreground colour.
-
- @see SetTextForeground()
- */
- wxColour GetTextForeground() const;
- const wxColour GetTextForeground() const;
- //@}
-
- /**
- Gets the current user scale factor.
-
- @see SetUserScale()
- */
- void GetUserScale(double* x, double* y) const;
-
- /**
- Converts logical X coordinate to device coordinate, using the current
- mapping mode.
- */
- wxCoord LogicalToDeviceX(wxCoord x) const;
-
- /**
- Converts logical X coordinate to relative device coordinate, using the
- current mapping mode but ignoring the x axis orientation. Use this for
- converting a width, for example.
- */
- wxCoord LogicalToDeviceXRel(wxCoord x) const;
-
- /**
- Converts logical Y coordinate to device coordinate, using the current
- mapping mode.
- */
- wxCoord LogicalToDeviceY(wxCoord y) const;
-
- /**
- Converts logical Y coordinate to relative device coordinate, using the
- current mapping mode but ignoring the y axis orientation. Use this for
- converting a height, for example.
- */
- wxCoord LogicalToDeviceYRel(wxCoord y) const;
-
- /**
- Gets the maximum horizontal extent used in drawing commands so far.
- */
- wxCoord MaxX() const;
-
- /**
- Gets the maximum vertical extent used in drawing commands so far.
- */
- wxCoord MaxY() const;
-
- /**
- Gets the minimum horizontal extent used in drawing commands so far.
- */
- wxCoord MinX() const;
-
- /**
- Gets the minimum vertical extent used in drawing commands so far.
- */
- wxCoord MinY() const;
-
- /**
- Returns @true if the DC is ok to use. @false values arise from being
- unable to write the file.
- */
- bool IsOk();
-
- /**
- Resets the bounding box. After a call to this function, the bounding
- box doesn't contain anything.
-
- @see CalcBoundingBox()
- */
- void ResetBoundingBox();
-
- /**
- Sets the x and y axis orientation (i.e., the direction from lowest to
- highest values on the axis). The default orientation is the natural
- orientation, e.g. x axis from left to right and y axis from bottom up.
-
- @param xLeftRight
- @true to set the x axis orientation to the natural left to right
- orientation, @false to invert it.
- @param yBottomUp
- @true to set the y axis orientation to the natural bottom up
- orientation, @false to invert it.
- */
- void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
-
- /**
- Sets the current background brush for the DC.
- */
- void SetBackground(const wxBrush& brush);
-
- /**
- @a mode may be one of wxSOLID and wxTRANSPARENT. This setting determines
- whether text will be drawn with a background colour or not.
- */
- void SetBackgroundMode(int mode);
-
- /**
- Sets the current brush for the DC. If the argument is wxNullBrush, the
- current brush is selected out of the device context, and the original
- brush restored, allowing the current brush to be destroyed safely.
-
- @see wxBrush, wxMemoryDC (for the interpretation of colours
- when drawing into a monochrome bitmap).
- */
- void SetBrush(const wxBrush& brush);
-
- //@{
- /**
- Not implemented.
- */
- void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
- wxCoord height);
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
- void SetClippingRegion(const wxRect& rect);
- void SetClippingRegion(const wxRegion& region);
- //@}
-
- /**
- Sets the device origin (i.e., the origin in pixels after scaling has
- been applied). This function may be useful in Windows printing
- operations for placing a graphic on a page.
- */
- void SetDeviceOrigin(wxCoord x, wxCoord y);
-
- /**
- Sets the current font for the DC. It must be a valid font, in
- particular you should not pass @c wxNullFont to this method.
-
- @see wxFont
- */
- void SetFont(const wxFont& font);
-
- /**
- Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is
- available. Trying to set one of the other values will fail.
- */
- void SetLogicalFunction(wxRasterOperationMode function);
-
- /**
- The mapping mode of the device context defines the unit of measurement
- used to convert logical units to device units. Note that in X, text
- drawing isn't handled consistently with the mapping mode; a font is
- always specified in point size. However, setting the user scale scales
- the text appropriately. In Windows, scalable TrueType fonts are always
- used; in X, results depend on availability of fonts, but usually a
- reasonable match is found.
-
- Note that the coordinate origin should ideally be selectable, but for
- now is always at the top left of the screen/printer.
-
- Drawing to a Windows printer device context under UNIX uses the current
- mapping mode, but mapping mode is currently ignored for PostScript
- output.
-
- The mapping mode can be one of the following:
- - wxMM_TWIPS - Each logical unit is 1/20 of a point, or 1/1440 of an
- inch.
- - wxMM_POINTS - Each logical unit is a point, or 1/72 of an inch.
- - wxMM_METRIC - Each logical unit is 1 mm.
- - wxMM_LOMETRIC - Each logical unit is 1/10 of a mm.
- - wxMM_TEXT - Each logical unit is 1 pixel.
- */
- void SetMapMode(wxMappingMode mode);
-
- /**
- Not implemented.
- */